|
990 | 990 | exports.RealComplexSpace = RealComplexSpace; |
991 | 991 | }); |
992 | 992 |
|
993 | | - var RealDrawBoardDefaults = createCommonjsModule(function (module, exports) { |
994 | | - Object.defineProperty(exports, "__esModule", { value: true }); |
995 | | - exports.RealDrawBoardDefaults = void 0; |
996 | | - exports.RealDrawBoardDefaults = { |
997 | | - brushSize: 1, |
998 | | - eraserSize: 2, |
999 | | - brushColor: [1, 1, 1], |
1000 | | - allowUndo: false, |
1001 | | - maxUndos: 10, |
1002 | | - tool: 'brush' |
1003 | | - }; |
1004 | | - }); |
1005 | | - |
1006 | | - var RealDrawBoardTypes = createCommonjsModule(function (module, exports) { |
1007 | | - Object.defineProperty(exports, "__esModule", { value: true }); |
1008 | | - }); |
1009 | | - |
1010 | | - var _initializeKernels_1 = createCommonjsModule(function (module, exports) { |
1011 | | - Object.defineProperty(exports, "__esModule", { value: true }); |
1012 | | - exports._initializeKernels = void 0; |
1013 | | - |
1014 | | - |
1015 | | - function _initializeKernels() { |
1016 | | - this._plotKernel = plot.getPlotKernel(this.gpu, this.dimensions, this.xScaleFactor, this.yScaleFactor, this.xOffset, this.yOffset); |
1017 | | - this._previewPlot = plot.getPlotKernel(this.gpu, this.dimensions, this.xScaleFactor, this.yScaleFactor, this.xOffset, this.yOffset); |
1018 | | - this._strokeKernel = interpolate.getInterpolateKernel(this.gpu, this.dimensions, this.xScaleFactor, this.yScaleFactor, this.xOffset, this.yOffset); |
1019 | | - } |
1020 | | - exports._initializeKernels = _initializeKernels; |
1021 | | - }); |
1022 | | - |
1023 | | - var _draw = createCommonjsModule(function (module, exports) { |
1024 | | - Object.defineProperty(exports, "__esModule", { value: true }); |
1025 | | - exports._stroke = exports._plot = void 0; |
1026 | | - function _plot(x, y, size, color) { |
1027 | | - this.graphPixels = this._plotKernel(this._cloneTexture(this.graphPixels), x, y, size, color); |
1028 | | - return this; |
1029 | | - } |
1030 | | - exports._plot = _plot; |
1031 | | - function _stroke(x, y, size, color, identifier) { |
1032 | | - if (!this._lastCoords.has(identifier)) |
1033 | | - this._lastCoords.set(identifier, [x, y]); |
1034 | | - this.graphPixels = this._strokeKernel(this._cloneTexture(this.graphPixels), this._lastCoords.get(identifier), [x, y], size, color); |
1035 | | - } |
1036 | | - exports._stroke = _stroke; |
1037 | | - }); |
1038 | | - |
1039 | | - var undo_1 = createCommonjsModule(function (module, exports) { |
1040 | | - Object.defineProperty(exports, "__esModule", { value: true }); |
1041 | | - exports.redo = exports.undo = void 0; |
1042 | | - function undo(numUndo) { |
1043 | | - if (numUndo === void 0) { numUndo = 1; } |
1044 | | - if (this._currentSnapshotIndex - numUndo >= 0 && |
1045 | | - this._currentSnapshotIndex - numUndo < this._snapshots.length) { |
1046 | | - var wasDrawing = this._isDrawing; |
1047 | | - this.stopRender(); |
1048 | | - this.graphPixels = this._loadData(this._snapshots[this._currentSnapshotIndex - numUndo]); |
1049 | | - this._currentSnapshotIndex -= numUndo; |
1050 | | - this._display(this.graphPixels); |
1051 | | - if (wasDrawing) |
1052 | | - this.startRender(); |
1053 | | - } |
1054 | | - return this; |
1055 | | - } |
1056 | | - exports.undo = undo; |
1057 | | - function redo(numRedo) { |
1058 | | - if (numRedo === void 0) { numRedo = 1; } |
1059 | | - this.undo(-numRedo); |
1060 | | - return this; |
1061 | | - } |
1062 | | - exports.redo = redo; |
1063 | | - }); |
1064 | | - |
1065 | 993 | var brush = createCommonjsModule(function (module, exports) { |
1066 | 994 | Object.defineProperty(exports, "__esModule", { value: true }); |
1067 | | - exports._toolPreview = exports._doStroke = exports._endStroke = exports._startStroke = exports.name = void 0; |
| 995 | + exports._toolPreview = exports._doStroke = exports._endStroke = exports._startStroke = exports.BrushDefaults = exports.name = void 0; |
1068 | 996 | exports.name = 'brush'; |
| 997 | + exports.BrushDefaults = { |
| 998 | + brushColor: [1, 1, 1], |
| 999 | + brushSize: 1 |
| 1000 | + }; |
1069 | 1001 | function _startStroke(coords, identifier) { |
1070 | 1002 | this._doPreview = false; |
1071 | | - this._plot(coords[0], coords[1], this.brushSize, this.brushColor); |
| 1003 | + this._plot(coords[0], coords[1], this.toolSettings.brushSize, this.toolSettings.brushColor); |
1072 | 1004 | } |
1073 | 1005 | exports._startStroke = _startStroke; |
1074 | 1006 | function _endStroke(endCoords, identifier) { |
1075 | | - this._plot(endCoords[0], endCoords[1], this.brushSize, this.brushColor); |
| 1007 | + this._plot(endCoords[0], endCoords[1], this.toolSettings.brushSize, this.toolSettings.brushColor); |
1076 | 1008 | this._doPreview = true; |
1077 | 1009 | } |
1078 | 1010 | exports._endStroke = _endStroke; |
1079 | 1011 | function _doStroke(coords, identifier) { |
1080 | | - this._plot(coords[0], coords[1], this.brushSize, this.brushColor); |
1081 | | - this._stroke(coords[0], coords[1], this.brushSize, this.brushColor, identifier); |
| 1012 | + this._plot(coords[0], coords[1], this.toolSettings.brushSize, this.toolSettings.brushColor); |
| 1013 | + this._stroke(coords[0], coords[1], this.toolSettings.brushSize, this.toolSettings.brushColor, identifier); |
1082 | 1014 | } |
1083 | 1015 | exports._doStroke = _doStroke; |
1084 | 1016 | function _toolPreview(coords, identifier) { |
1085 | | - return this._previewPlot(this.graphPixels, coords[0], coords[1], this.brushSize, this.brushColor); |
| 1017 | + return this._previewPlot(this.graphPixels, coords[0], coords[1], this.toolSettings.brushSize, this.toolSettings.brushColor); |
1086 | 1018 | } |
1087 | 1019 | exports._toolPreview = _toolPreview; |
1088 | 1020 | }); |
1089 | 1021 |
|
1090 | 1022 | var eraser = createCommonjsModule(function (module, exports) { |
1091 | 1023 | Object.defineProperty(exports, "__esModule", { value: true }); |
1092 | | - exports._toolPreview = exports._doStroke = exports._endStroke = exports._startStroke = exports.name = void 0; |
| 1024 | + exports._toolPreview = exports._doStroke = exports._endStroke = exports._startStroke = exports.EraserDefaults = exports.name = void 0; |
1093 | 1025 | exports.name = 'eraser'; |
| 1026 | + exports.EraserDefaults = { |
| 1027 | + eraserSize: 2 |
| 1028 | + }; |
1094 | 1029 | function _startStroke(coords, identifier) { |
1095 | 1030 | this._doPreview = false; |
1096 | | - this._plot(coords[0], coords[1], this.eraserSize, this.bgColor); |
| 1031 | + this._plot(coords[0], coords[1], this.toolSettings.eraserSize, this.bgColor); |
1097 | 1032 | } |
1098 | 1033 | exports._startStroke = _startStroke; |
1099 | 1034 | function _endStroke(endCoords, identifier) { |
1100 | 1035 | this._doPreview = true; |
1101 | | - this._plot(endCoords[0], endCoords[1], this.eraserSize, this.bgColor); |
| 1036 | + this._plot(endCoords[0], endCoords[1], this.toolSettings.eraserSize, this.bgColor); |
1102 | 1037 | } |
1103 | 1038 | exports._endStroke = _endStroke; |
1104 | 1039 | function _doStroke(coords, identifier) { |
1105 | | - this._plot(coords[0], coords[1], this.eraserSize, this.bgColor); |
1106 | | - this._stroke(coords[0], coords[1], this.eraserSize, this.bgColor, identifier); |
| 1040 | + this._plot(coords[0], coords[1], this.toolSettings.eraserSize, this.bgColor); |
| 1041 | + this._stroke(coords[0], coords[1], this.toolSettings.eraserSize, this.bgColor, identifier); |
1107 | 1042 | } |
1108 | 1043 | exports._doStroke = _doStroke; |
1109 | 1044 | function _toolPreview(coords, identifier) { |
1110 | | - return this._previewPlot(this.graphPixels, coords[0], coords[1], this.eraserSize, this.bgColor); |
| 1045 | + return this._previewPlot(this.graphPixels, coords[0], coords[1], this.toolSettings.eraserSize, this.bgColor); |
1111 | 1046 | } |
1112 | 1047 | exports._toolPreview = _toolPreview; |
1113 | 1048 | }); |
1114 | 1049 |
|
1115 | 1050 | var line = createCommonjsModule(function (module, exports) { |
1116 | 1051 | Object.defineProperty(exports, "__esModule", { value: true }); |
1117 | | - exports._toolPreview = exports._doStroke = exports._endStroke = exports._startStroke = exports.name = void 0; |
| 1052 | + exports._toolPreview = exports._doStroke = exports._endStroke = exports._startStroke = exports.LineDefaults = exports.name = void 0; |
1118 | 1053 | exports.name = 'line'; |
| 1054 | + exports.LineDefaults = { |
| 1055 | + lineThickness: 1, |
| 1056 | + lineColor: [1, 1, 1] |
| 1057 | + }; |
1119 | 1058 | /** key -> identifier, value -> coordinate |
1120 | 1059 | * For mouse, the key is 'mouse', for touches, stringified identifier -> https://developer.mozilla.org/en-US/docs/Web/API/Touch/identifier |
1121 | 1060 | */ |
1122 | 1061 | var _startCoords = new Map(); /* key -> identifier, value -> coordinate*/ |
1123 | 1062 | function _startStroke(coords, identifier) { |
1124 | | - this._plot(coords[0], coords[1], this.brushSize, this.brushColor); |
| 1063 | + this._plot(coords[0], coords[1], this.toolSettings.lineThickness, this.toolSettings.lineColor); |
1125 | 1064 | _startCoords.set(identifier, coords); |
1126 | 1065 | } |
1127 | 1066 | exports._startStroke = _startStroke; |
1128 | 1067 | function _endStroke(endCoords, identifier) { |
1129 | | - this.graphPixels = this._strokeKernel(this._cloneTexture(this.graphPixels), _startCoords.get(identifier), endCoords, this.brushSize, this.brushColor); |
1130 | | - this._plot(endCoords[0], endCoords[1], this.brushSize, this.brushColor); |
| 1068 | + this.graphPixels = this._strokeKernel(this._cloneTexture(this.graphPixels), _startCoords.get(identifier), endCoords, this.toolSettings.lineThickness, this.toolSettings.lineColor); |
| 1069 | + this._plot(endCoords[0], endCoords[1], this.toolSettings.lineThickness, this.toolSettings.lineColor); |
1131 | 1070 | _startCoords.delete(identifier); |
1132 | 1071 | } |
1133 | 1072 | exports._endStroke = _endStroke; |
|
1136 | 1075 | exports._doStroke = _doStroke; |
1137 | 1076 | function _toolPreview(coords, identifier) { |
1138 | 1077 | if (_startCoords.has(identifier)) { |
1139 | | - return this._previewPlot(this._strokeKernel(this._cloneTexture(this.graphPixels), _startCoords.get(identifier), coords, this.brushSize, this.brushColor), coords[0], coords[1], this.brushSize, this.brushColor); |
| 1078 | + return this._previewPlot(this._strokeKernel(this._cloneTexture(this.graphPixels), _startCoords.get(identifier), coords, this.toolSettings.lineThickness, this.toolSettings.lineColor), coords[0], coords[1], this.toolSettings.lineThickness, this.toolSettings.lineColor); |
1140 | 1079 | } |
1141 | 1080 | else |
1142 | | - return this._previewPlot(this.graphPixels, coords[0], coords[1], this.brushSize, this.brushColor); |
| 1081 | + return this._previewPlot(this.graphPixels, coords[0], coords[1], this.toolSettings.lineThickness, this.toolSettings.lineColor); |
1143 | 1082 | } |
1144 | 1083 | exports._toolPreview = _toolPreview; |
1145 | 1084 | }); |
|
1203 | 1142 |
|
1204 | 1143 | var rainbow_brush = createCommonjsModule(function (module, exports) { |
1205 | 1144 | Object.defineProperty(exports, "__esModule", { value: true }); |
1206 | | - exports._toolPreview = exports._doStroke = exports._endStroke = exports._startStroke = exports.name = void 0; |
| 1145 | + exports._toolPreview = exports._doStroke = exports._endStroke = exports._startStroke = exports.RainbowBrushDefaults = exports.name = void 0; |
1207 | 1146 |
|
1208 | 1147 | var hue = 0; |
1209 | 1148 | var gradientColors = [1, 1, 1]; |
1210 | 1149 | exports.name = 'rainbow_brush'; |
| 1150 | + exports.RainbowBrushDefaults = { |
| 1151 | + brushSize: 1, |
| 1152 | + changeRate: 1 |
| 1153 | + }; |
1211 | 1154 | function _startStroke(coords, identifier) { |
1212 | 1155 | gradientColors = convertHSLToRGB_1.convertHSLToRGB(hue, 90, 40); |
1213 | 1156 | this._doPreview = false; |
1214 | | - this._plot(coords[0], coords[1], this.brushSize, gradientColors); |
| 1157 | + this._plot(coords[0], coords[1], this.toolSettings.brushSize, gradientColors); |
1215 | 1158 | } |
1216 | 1159 | exports._startStroke = _startStroke; |
1217 | 1160 | function _endStroke(endCoords, identifier) { |
1218 | 1161 | gradientColors = convertHSLToRGB_1.convertHSLToRGB(hue, 90, 40); |
1219 | | - this._plot(endCoords[0], endCoords[1], this.brushSize, gradientColors); |
| 1162 | + this._plot(endCoords[0], endCoords[1], this.toolSettings.brushSize, gradientColors); |
1220 | 1163 | this._doPreview = true; |
1221 | 1164 | } |
1222 | 1165 | exports._endStroke = _endStroke; |
1223 | 1166 | function _doStroke(coords, identifier) { |
1224 | | - hue = (hue + 1) % 360; |
| 1167 | + hue = (hue + this.toolSettings.changeRate) % 360; |
1225 | 1168 | gradientColors = convertHSLToRGB_1.convertHSLToRGB(hue, 90, 40); |
1226 | | - this._plot(coords[0], coords[1], this.brushSize, gradientColors); |
1227 | | - this._stroke(coords[0], coords[1], this.brushSize, gradientColors, identifier); |
| 1169 | + this._plot(coords[0], coords[1], this.toolSettings.brushSize, gradientColors); |
| 1170 | + this._stroke(coords[0], coords[1], this.toolSettings.brushSize, gradientColors, identifier); |
1228 | 1171 | } |
1229 | 1172 | exports._doStroke = _doStroke; |
1230 | 1173 | function _toolPreview(coords, identifier) { |
1231 | | - return this._previewPlot(this.graphPixels, coords[0], coords[1], this.brushSize, gradientColors); |
| 1174 | + return this._previewPlot(this.graphPixels, coords[0], coords[1], this.toolSettings.brushSize, gradientColors); |
1232 | 1175 | } |
1233 | 1176 | exports._toolPreview = _toolPreview; |
1234 | 1177 | }); |
1235 | 1178 |
|
1236 | 1179 | var tools = createCommonjsModule(function (module, exports) { |
| 1180 | + var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () { |
| 1181 | + __assign = Object.assign || function(t) { |
| 1182 | + for (var s, i = 1, n = arguments.length; i < n; i++) { |
| 1183 | + s = arguments[i]; |
| 1184 | + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) |
| 1185 | + t[p] = s[p]; |
| 1186 | + } |
| 1187 | + return t; |
| 1188 | + }; |
| 1189 | + return __assign.apply(this, arguments); |
| 1190 | + }; |
1237 | 1191 | Object.defineProperty(exports, "__esModule", { value: true }); |
1238 | | - exports.tools = void 0; |
| 1192 | + exports.ToolDefaults = exports.tools = void 0; |
1239 | 1193 |
|
1240 | 1194 |
|
1241 | 1195 |
|
|
1246 | 1200 | eraser: eraser, |
1247 | 1201 | line: line |
1248 | 1202 | }; |
| 1203 | + exports.ToolDefaults = __assign(__assign(__assign(__assign({}, brush.BrushDefaults), line.LineDefaults), eraser.EraserDefaults), rainbow_brush.RainbowBrushDefaults); |
1249 | 1204 | }); |
1250 | 1205 |
|
1251 | | - var boardManip = createCommonjsModule(function (module, exports) { |
| 1206 | + var RealDrawBoardDefaults = createCommonjsModule(function (module, exports) { |
| 1207 | + Object.defineProperty(exports, "__esModule", { value: true }); |
| 1208 | + exports.RealDrawBoardDefaults = void 0; |
| 1209 | + |
| 1210 | + exports.RealDrawBoardDefaults = { |
| 1211 | + toolSettings: tools.ToolDefaults, |
| 1212 | + allowUndo: false, |
| 1213 | + maxUndos: 10, |
| 1214 | + tool: 'brush' |
| 1215 | + }; |
| 1216 | + }); |
| 1217 | + |
| 1218 | + var RealDrawBoardTypes = createCommonjsModule(function (module, exports) { |
| 1219 | + Object.defineProperty(exports, "__esModule", { value: true }); |
| 1220 | + }); |
| 1221 | + |
| 1222 | + var _initializeKernels_1 = createCommonjsModule(function (module, exports) { |
1252 | 1223 | Object.defineProperty(exports, "__esModule", { value: true }); |
1253 | | - exports._resetBoard = exports.clear = exports.changeTool = exports.changeEraserSize = exports.changeBrushSize = exports.changeBrushColor = void 0; |
| 1224 | + exports._initializeKernels = void 0; |
| 1225 | + |
| 1226 | + |
| 1227 | + function _initializeKernels() { |
| 1228 | + this._plotKernel = plot.getPlotKernel(this.gpu, this.dimensions, this.xScaleFactor, this.yScaleFactor, this.xOffset, this.yOffset); |
| 1229 | + this._previewPlot = plot.getPlotKernel(this.gpu, this.dimensions, this.xScaleFactor, this.yScaleFactor, this.xOffset, this.yOffset); |
| 1230 | + this._strokeKernel = interpolate.getInterpolateKernel(this.gpu, this.dimensions, this.xScaleFactor, this.yScaleFactor, this.xOffset, this.yOffset); |
| 1231 | + } |
| 1232 | + exports._initializeKernels = _initializeKernels; |
| 1233 | + }); |
1254 | 1234 |
|
1255 | | - function changeBrushColor(color) { |
1256 | | - this.brushColor = color; |
| 1235 | + var _draw = createCommonjsModule(function (module, exports) { |
| 1236 | + Object.defineProperty(exports, "__esModule", { value: true }); |
| 1237 | + exports._stroke = exports._plot = void 0; |
| 1238 | + function _plot(x, y, size, color) { |
| 1239 | + this.graphPixels = this._plotKernel(this._cloneTexture(this.graphPixels), x, y, size, color); |
1257 | 1240 | return this; |
1258 | 1241 | } |
1259 | | - exports.changeBrushColor = changeBrushColor; |
1260 | | - function changeBrushSize(newSize) { |
1261 | | - this.brushSize = newSize; |
| 1242 | + exports._plot = _plot; |
| 1243 | + function _stroke(x, y, size, color, identifier) { |
| 1244 | + if (!this._lastCoords.has(identifier)) |
| 1245 | + this._lastCoords.set(identifier, [x, y]); |
| 1246 | + this.graphPixels = this._strokeKernel(this._cloneTexture(this.graphPixels), this._lastCoords.get(identifier), [x, y], size, color); |
| 1247 | + } |
| 1248 | + exports._stroke = _stroke; |
| 1249 | + }); |
| 1250 | + |
| 1251 | + var undo_1 = createCommonjsModule(function (module, exports) { |
| 1252 | + Object.defineProperty(exports, "__esModule", { value: true }); |
| 1253 | + exports.redo = exports.undo = void 0; |
| 1254 | + function undo(numUndo) { |
| 1255 | + if (numUndo === void 0) { numUndo = 1; } |
| 1256 | + if (this._currentSnapshotIndex - numUndo >= 0 && |
| 1257 | + this._currentSnapshotIndex - numUndo < this._snapshots.length) { |
| 1258 | + var wasDrawing = this._isDrawing; |
| 1259 | + this.stopRender(); |
| 1260 | + this.graphPixels = this._loadData(this._snapshots[this._currentSnapshotIndex - numUndo]); |
| 1261 | + this._currentSnapshotIndex -= numUndo; |
| 1262 | + this._display(this.graphPixels); |
| 1263 | + if (wasDrawing) |
| 1264 | + this.startRender(); |
| 1265 | + } |
1262 | 1266 | return this; |
1263 | 1267 | } |
1264 | | - exports.changeBrushSize = changeBrushSize; |
1265 | | - function changeEraserSize(newSize) { |
1266 | | - this.eraserSize = newSize; |
| 1268 | + exports.undo = undo; |
| 1269 | + function redo(numRedo) { |
| 1270 | + if (numRedo === void 0) { numRedo = 1; } |
| 1271 | + this.undo(-numRedo); |
1267 | 1272 | return this; |
1268 | 1273 | } |
1269 | | - exports.changeEraserSize = changeEraserSize; |
| 1274 | + exports.redo = redo; |
| 1275 | + }); |
| 1276 | + |
| 1277 | + var boardManip = createCommonjsModule(function (module, exports) { |
| 1278 | + Object.defineProperty(exports, "__esModule", { value: true }); |
| 1279 | + exports._resetBoard = exports.clear = exports.changeToolSetting = exports.changeTool = void 0; |
| 1280 | + |
1270 | 1281 | function changeTool(newTool) { |
1271 | 1282 | this.tool = newTool; |
1272 | 1283 | this._startStroke = tools.tools[this.tool]._startStroke; |
|
1276 | 1287 | return this; |
1277 | 1288 | } |
1278 | 1289 | exports.changeTool = changeTool; |
| 1290 | + function changeToolSetting(settingName, value) { |
| 1291 | + this.toolSettings[settingName] = value; |
| 1292 | + return this; |
| 1293 | + } |
| 1294 | + exports.changeToolSetting = changeToolSetting; |
1279 | 1295 | function clear() { |
1280 | 1296 | this._snapshots = []; |
1281 | 1297 | this._currentSnapshotIndex = 0; |
|
1290 | 1306 | function _resetBoard() { |
1291 | 1307 | this.xScaleFactor = this.options.xScaleFactor; |
1292 | 1308 | this.yScaleFactor = this.options.yScaleFactor; |
1293 | | - this.brushColor = this.options.brushColor; |
1294 | | - this.brushSize = this.options.brushSize; |
1295 | 1309 | this.bgColor = this.options.bgColor; |
1296 | | - this.eraserSize = this.options.eraserSize; |
1297 | 1310 | this.tool = this.options.tool; |
| 1311 | + this.toolSettings = this.options.toolSettings; |
1298 | 1312 | this._isDrawing = false; |
1299 | 1313 | this._currentSnapshotIndex = 0; |
1300 | 1314 | if (this._maxSnapshots > 0) |
|
1435 | 1449 | _this._getTouchCoords = _coords._getTouchCoords; |
1436 | 1450 | _this.undo = undo_1.undo; |
1437 | 1451 | _this.redo = undo_1.redo; |
1438 | | - _this.changeBrushColor = boardManip.changeBrushColor; |
1439 | | - _this.changeBrushSize = boardManip.changeBrushSize; |
1440 | | - _this.changeEraserSize = boardManip.changeEraserSize; |
| 1452 | + _this.changeToolSetting = boardManip.changeToolSetting; |
1441 | 1453 | _this.changeTool = boardManip.changeTool; |
1442 | 1454 | _this.clear = boardManip.clear; |
1443 | 1455 | // --- DOM Event Listeners --- |
|
1550 | 1562 | }; |
1551 | 1563 | options = __assign(__assign({}, RealDrawBoardDefaults.RealDrawBoardDefaults), options); |
1552 | 1564 | _this.options = options; |
1553 | | - _this.brushSize = options.brushSize; |
1554 | | - _this.brushColor = options.brushColor; |
1555 | | - _this.eraserSize = options.eraserSize; |
| 1565 | + _this.toolSettings = options.toolSettings; |
1556 | 1566 | _this._maxSnapshots = options.allowUndo ? Math.max(options.maxUndos + 1, 0) : 0; |
1557 | 1567 | _this.changeTool(options.tool); |
1558 | 1568 | // *****DEFAULTS***** |
|
0 commit comments