fabric.buttons.json 5.08 KB
Newer Older
bbaer's avatar
buttons  
bbaer committed
1
2
3
4
5
6
7
8
9
10
11
{
    "modes": [
        {
            "name": "draw",
            "selector": "drawing-mode",
            "requiresDrawing": true,
            "requiresSelection": false,
            "isToggle": true,
            "toggle": "isDrawingMode",
            "hasToggleElement": false,
            "toggleElement": "",
bbaer's avatar
bbaer committed
12
            "disabled": false,
bbaer's avatar
bbaer committed
13
            "tooltip": "Draw with a pencil",
bbaer's avatar
buttons  
bbaer committed
14
15
16
17
18
19
20
21
22
23
24
            "icon": "glyphicon-pencil"
        },
        {
            "name": "highlight",
            "selector": "highlight-mode",
            "requiresDrawing": true,
            "requiresSelection": false,
            "isToggle": true,
            "toggle": "isHighlightMode",
            "hasToggleElement": false,
            "toggleElement": "",
bbaer's avatar
bbaer committed
25
            "disabled": false,
bbaer's avatar
bbaer committed
26
            "tooltip": "Highlighter",
bbaer's avatar
buttons  
bbaer committed
27
28
            "icon": "glyphicon-pencil"
        },
29

bbaer's avatar
buttons  
bbaer committed
30
31
32
33
34
35
36
37
38
        {
          "name": "emoji",
          "selector": "add-emoji",
          "requiresDrawing": false,
          "requiresSelection": true,
          "isToggle": true,
          "toggle": "emojiMode",
          "hasToggleElement": true,
          "toggleElement": "emojiContainer",
bbaer's avatar
bbaer committed
39
          "disabled": false,
bbaer's avatar
bbaer committed
40
          "tooltip": "Emojis",
bbaer's avatar
buttons  
bbaer committed
41
42
43
44
45
46
47
48
49
50
51
          "icon": "glyphicon-ice-lolly-tasted"
        },
        {
            "name": "rectangle",
            "selector": "add-rect",
            "requiresDrawing": false,
            "requiresSelection": false,
            "isToggle": true,
            "toggle": "drawRectangleMode",
            "hasToggleElement": false,
            "toggleElement": "",
bbaer's avatar
bbaer committed
52
          "disabled": false,
bbaer's avatar
bbaer committed
53
          "tooltip": "Draw a rectangle to highlight areas",
bbaer's avatar
buttons  
bbaer committed
54
55
            "icon": "glyphicon-stop"
        },
bbaer's avatar
bbaer committed
56
57
58
59
60
61
62
63
64
      {
        "name": "write",
        "selector": "add-text",
        "requiresDrawing": false,
        "requiresSelection": false,
        "isToggle": false,
        "toggle": "",
        "hasToggleElement": false,
        "toggleElement": "",
bbaer's avatar
bbaer committed
65
        "disabled": false,
bbaer's avatar
bbaer committed
66
        "tooltip": "Adds a customizable text to canvas",
bbaer's avatar
bbaer committed
67
68
        "icon": "glyphicon-text-height"
      },
bbaer's avatar
buttons  
bbaer committed
69
70
71
72
        {
            "name": "move",
            "selector": "move-mode",
            "requiresDrawing": false,
bbaer's avatar
changi    
bbaer committed
73
            "requiresSelection": false,
bbaer's avatar
buttons  
bbaer committed
74
            "isToggle": true,
bbaer's avatar
changi    
bbaer committed
75
            "toggle": "moveMode",
bbaer's avatar
buttons  
bbaer committed
76
77
            "hasToggleElement": false,
            "toggleElement": "",
bbaer's avatar
bbaer committed
78
          "disabled": false,
bbaer's avatar
bbaer committed
79
          "tooltip": "Move the viewport, useful if zoomed",
bbaer's avatar
buttons  
bbaer committed
80
81
82
83
84
85
86
87
88
89
90
            "icon": "glyphicon-move"
        },
        {
            "name": "delete",
            "selector": "clear-canvas",
            "requiresDrawing": false,
            "requiresSelection": false,
            "isToggle": false,
            "toggle": "",
            "hasToggleElement": false,
            "toggleElement": "",
bbaer's avatar
bbaer committed
91
          "disabled": false,
bbaer's avatar
bbaer committed
92
          "tooltip": "Delete selected object",
bbaer's avatar
buttons  
bbaer committed
93
            "icon": "glyphicon-trash"
bbaer's avatar
bbaer committed
94
95
96
97
98
99
100
101
102
103
        },
        {
          "name": "zoom",
          "selector": "zoom-canvas",
          "requiresDrawing": false,
          "requiresSelection": false,
          "isToggle": true,
          "toggle": "isZoomMode",
          "hasToggleElement": false,
          "toggleElement": "",
bbaer's avatar
bbaer committed
104
          "disabled": false,
bbaer's avatar
bbaer committed
105
          "tooltip": "Zoom viewport",
bbaer's avatar
bbaer committed
106
          "icon": "glyphicon-search"
bbaer's avatar
bbaer committed
107
108
        },
      {
bbaer's avatar
bbaer committed
109
110
        "name": "freeMouse",
        "selector": "mouse-mode",
bbaer's avatar
bbaer committed
111
        "requiresDrawing": false,
bbaer's avatar
bbaer committed
112
113
114
        "requiresSelection": true,
        "isToggle": true,
        "toggle": "isMouseMode",
bbaer's avatar
bbaer committed
115
116
        "hasToggleElement": false,
        "toggleElement": "",
bbaer's avatar
bbaer committed
117
        "disabled": false,
bbaer's avatar
bbaer committed
118
        "tooltip": "Normal mouse to select objects in canvas",
bbaer's avatar
bbaer committed
119
        "icon": "glyphicon-hand-up"
bbaer's avatar
bbaer committed
120
121
122
123
124
125
126
127
128
129
      },
      {
        "name": "undo",
        "selector": "undo",
        "requiresDrawing": false,
        "requiresSelection": false,
        "isToggle": false,
        "toggle": "",
        "hasToggleElement": false,
        "toggleElement": "",
bbaer's avatar
bbaer committed
130
        "disabled": true,
bbaer's avatar
bbaer committed
131
        "tooltip": "Undo",
bbaer's avatar
bbaer committed
132
        "icon": "glyphicon-repeat icon-flipped"
bbaer's avatar
bbaer committed
133
134
135
136
137
138
139
140
141
142
      },
      {
        "name": "redo",
        "selector": "redo",
        "requiresDrawing": false,
        "requiresSelection": false,
        "isToggle": false,
        "toggle": "",
        "hasToggleElement": false,
        "toggleElement": "",
bbaer's avatar
bbaer committed
143
        "disabled": true,
bbaer's avatar
bbaer committed
144
        "tooltip": "Redo",
bbaer's avatar
bbaer committed
145
        "icon": "glyphicon-repeat"
bbaer's avatar
bbaer committed
146
      }
bbaer's avatar
bbaer committed
147

bbaer's avatar
buttons  
bbaer committed
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
    ],
    "currentMode": "draw",
  "colors": [
    {
      "name": "blue",
      "selector": "draw-blue",
      "red": 0,
      "green": 68,
      "blue": 255
    },
    {
      "name": "light-blue",
      "selector": "draw-light-blue",
      "red": 0,
      "green": 204,
      "blue": 255
    },
    {
      "name": "red",
      "selector": "draw-red",
      "red": 255,
      "green": 0,
      "blue": 0
    },
    {
      "name": "pink",
      "selector": "draw-pink",
      "red": 255,
      "green": 53,
      "blue": 177
    },
    {
      "name": "green",
      "selector": "draw-green",
      "red": 133,
      "green": 169,
      "blue": 75
    },
    {
      "name": "yellow",
      "selector": "draw-yellow",
      "red": 255,
      "green": 204,
      "blue": 0
    }
  ]
}