fabric.buttons.json 3.43 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
bbaer committed
14
            "icon": "fa-pencil-alt"
bbaer's avatar
buttons    
bbaer committed
15
16
17
18
19
20
21
22
23
24
        },
        {
            "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",
27
            "icon": "fa-paint-brush"
bbaer's avatar
buttons    
bbaer committed
28
        },
29

bbaer's avatar
buttons    
bbaer committed
30
31
32
33
34
35
36
37
38
        {
            "name": "rectangle",
            "selector": "add-rect",
            "requiresDrawing": false,
            "requiresSelection": false,
            "isToggle": true,
            "toggle": "drawRectangleMode",
            "hasToggleElement": false,
            "toggleElement": "",
bbaer's avatar
bbaer committed
39
          "disabled": false,
bbaer's avatar
bbaer committed
40
          "tooltip": "Draw a rectangle to highlight areas",
bbaer's avatar
bbaer committed
41
            "icon": "fa-square"
bbaer's avatar
buttons    
bbaer committed
42
        },
bbaer's avatar
bbaer committed
43
44
45
46
47
48
49
50
51
      {
        "name": "write",
        "selector": "add-text",
        "requiresDrawing": false,
        "requiresSelection": false,
        "isToggle": false,
        "toggle": "",
        "hasToggleElement": false,
        "toggleElement": "",
bbaer's avatar
bbaer committed
52
        "disabled": false,
bbaer's avatar
bbaer committed
53
        "tooltip": "Adds a customizable text to canvas",
54
        "icon": "fa-i-cursor"
bbaer's avatar
bbaer committed
55
      },
bbaer's avatar
bbaer committed
56
    
bbaer's avatar
bbaer committed
57
58
59
60
61
62
63
64
65
        {
          "name": "zoom",
          "selector": "zoom-canvas",
          "requiresDrawing": false,
          "requiresSelection": false,
          "isToggle": true,
          "toggle": "isZoomMode",
          "hasToggleElement": false,
          "toggleElement": "",
bbaer's avatar
bbaer committed
66
          "disabled": false,
bbaer's avatar
bbaer committed
67
          "tooltip": "Zoom viewport",
68
          "icon": "fa-search-plus"
bbaer's avatar
bbaer committed
69
        },
bbaer's avatar
bbaer committed
70
      
bbaer's avatar
bbaer committed
71
72
73
74
75
76
77
78
79
      {
        "name": "undo",
        "selector": "undo",
        "requiresDrawing": false,
        "requiresSelection": false,
        "isToggle": false,
        "toggle": "",
        "hasToggleElement": false,
        "toggleElement": "",
bbaer's avatar
bbaer committed
80
        "disabled": true,
bbaer's avatar
bbaer committed
81
        "tooltip": "Undo",
82
        "icon": "fa-undo"
bbaer's avatar
bbaer committed
83
84
85
86
87
88
89
90
91
92
      },
      {
        "name": "redo",
        "selector": "redo",
        "requiresDrawing": false,
        "requiresSelection": false,
        "isToggle": false,
        "toggle": "",
        "hasToggleElement": false,
        "toggleElement": "",
bbaer's avatar
bbaer committed
93
        "disabled": true,
bbaer's avatar
bbaer committed
94
        "tooltip": "Redo",
bbaer's avatar
bbaer committed
95
        "icon": "fa-redo"
bbaer's avatar
bbaer committed
96
      }
bbaer's avatar
bbaer committed
97

bbaer's avatar
buttons    
bbaer committed
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
    ],
    "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
    }
  ]
}