@syncfusion/ej2-image-editor 25.1.37 → 25.1.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/ej2-image-editor.umd.min.js +2 -2
- package/dist/ej2-image-editor.umd.min.js.map +1 -1
- package/dist/es6/ej2-image-editor.es2015.js +91 -14
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +104 -14
- package/dist/es6/ej2-image-editor.es5.js.map +1 -1
- package/dist/global/ej2-image-editor.min.js +2 -2
- package/dist/global/ej2-image-editor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +9 -9
- package/src/image-editor/action/freehand-draw.js +3 -0
- package/src/image-editor/action/transform.js +36 -10
- package/src/image-editor/base/image-editor-model.d.ts +5 -0
- package/src/image-editor/base/image-editor.d.ts +8 -1
- package/src/image-editor/base/image-editor.js +4 -2
- package/src/image-editor/renderer/toolbar.d.ts +1 -0
- package/src/image-editor/renderer/toolbar.js +62 -3
|
@@ -7036,6 +7036,9 @@ var FreehandDrawing = /** @__PURE__ @class */ (function () {
|
|
|
7036
7036
|
case 'reset':
|
|
7037
7037
|
this.reset();
|
|
7038
7038
|
break;
|
|
7039
|
+
case 'triggerShapeChanging':
|
|
7040
|
+
this.triggerShapeChanging(args.value['shapeChangingArgs']);
|
|
7041
|
+
break;
|
|
7039
7042
|
}
|
|
7040
7043
|
};
|
|
7041
7044
|
FreehandDrawing.prototype.updateFhdPvtVar = function () {
|
|
@@ -16276,7 +16279,7 @@ var Transform = /** @__PURE__ @class */ (function () {
|
|
|
16276
16279
|
this.resetZoom();
|
|
16277
16280
|
break;
|
|
16278
16281
|
case 'pan':
|
|
16279
|
-
this.pan(args.value['value']);
|
|
16282
|
+
this.pan(args.value['value'], args.value['x'], args.value['y']);
|
|
16280
16283
|
break;
|
|
16281
16284
|
case 'zoom':
|
|
16282
16285
|
this.zoom(args.value['zoomFactor'], args.value['zoomPoint']);
|
|
@@ -17289,12 +17292,12 @@ var Transform = /** @__PURE__ @class */ (function () {
|
|
|
17289
17292
|
parent.notify('selection', { prop: 'getPanDown', onPropertyChange: false, value: { obj: obj } });
|
|
17290
17293
|
var panEventArgs = { startPoint: obj['panDown'], endPoint: this.panMove, cancel: false };
|
|
17291
17294
|
parent.trigger('panning', panEventArgs);
|
|
17292
|
-
this.panEvent(panEventArgs, xDiff, yDiff);
|
|
17293
|
-
};
|
|
17294
|
-
Transform.prototype.panEvent = function (panEventArgs, xDiff, yDiff) {
|
|
17295
17295
|
if (panEventArgs.cancel) {
|
|
17296
17296
|
return;
|
|
17297
17297
|
}
|
|
17298
|
+
this.panEvent(xDiff, yDiff);
|
|
17299
|
+
};
|
|
17300
|
+
Transform.prototype.panEvent = function (xDiff, yDiff, isPanMethod) {
|
|
17298
17301
|
var parent = this.parent;
|
|
17299
17302
|
var isObjCreated = false;
|
|
17300
17303
|
if (parent.activeObj.shape && parent.activeObj.shape === 'shape') {
|
|
@@ -17332,8 +17335,13 @@ var Transform = /** @__PURE__ @class */ (function () {
|
|
|
17332
17335
|
}
|
|
17333
17336
|
if (parent.transform.degree === 0) {
|
|
17334
17337
|
var point = void 0;
|
|
17335
|
-
if (isNullOrUndefined(xDiff) && isNullOrUndefined(yDiff)) {
|
|
17336
|
-
|
|
17338
|
+
if ((isNullOrUndefined(xDiff) && isNullOrUndefined(yDiff)) || isPanMethod) {
|
|
17339
|
+
if (isPanMethod) {
|
|
17340
|
+
point = this.updatePanPoints(xDiff, yDiff);
|
|
17341
|
+
}
|
|
17342
|
+
else {
|
|
17343
|
+
point = this.updatePanPoints();
|
|
17344
|
+
}
|
|
17337
17345
|
}
|
|
17338
17346
|
else {
|
|
17339
17347
|
point = { x: xDiff, y: yDiff };
|
|
@@ -17354,8 +17362,13 @@ var Transform = /** @__PURE__ @class */ (function () {
|
|
|
17354
17362
|
else {
|
|
17355
17363
|
var tempFlipState = parent.transform.currFlipState;
|
|
17356
17364
|
parent.isCropTab = true;
|
|
17357
|
-
if (isNullOrUndefined(xDiff) && isNullOrUndefined(yDiff)) {
|
|
17358
|
-
|
|
17365
|
+
if ((isNullOrUndefined(xDiff) && isNullOrUndefined(yDiff)) || isPanMethod) {
|
|
17366
|
+
if (isPanMethod) {
|
|
17367
|
+
parent.panPoint.currentPannedPoint = this.updatePanPoints(xDiff, yDiff);
|
|
17368
|
+
}
|
|
17369
|
+
else {
|
|
17370
|
+
parent.panPoint.currentPannedPoint = this.updatePanPoints();
|
|
17371
|
+
}
|
|
17359
17372
|
}
|
|
17360
17373
|
else {
|
|
17361
17374
|
parent.panPoint.currentPannedPoint = { x: xDiff, y: yDiff };
|
|
@@ -17642,7 +17655,7 @@ var Transform = /** @__PURE__ @class */ (function () {
|
|
|
17642
17655
|
parent.notify('draw', { prop: 'updateActiveObject', onPropertyChange: false, value: { actPoint: actPoint,
|
|
17643
17656
|
obj: parent.activeObj, isMouseMove: null, x: null, y: null } });
|
|
17644
17657
|
};
|
|
17645
|
-
Transform.prototype.pan = function (value) {
|
|
17658
|
+
Transform.prototype.pan = function (value, x, y) {
|
|
17646
17659
|
var parent = this.parent;
|
|
17647
17660
|
if (!parent.disabled && parent.isImageLoaded) {
|
|
17648
17661
|
if (value) {
|
|
@@ -17652,6 +17665,15 @@ var Transform = /** @__PURE__ @class */ (function () {
|
|
|
17652
17665
|
parent.notify('selection', { prop: 'setDragCanvas', value: { bool: true } });
|
|
17653
17666
|
parent.lowerCanvas.style.cursor = parent.upperCanvas.style.cursor = parent.cursor = 'grab';
|
|
17654
17667
|
parent.notify('selection', { prop: 'setPanDown', onPropertyChange: false, value: { panDown: null } });
|
|
17668
|
+
if (x || y) {
|
|
17669
|
+
x = x ? x : 0;
|
|
17670
|
+
y = y ? y : 0;
|
|
17671
|
+
if (isNullOrUndefined(this.tempPanMove)) {
|
|
17672
|
+
this.tempPanMove = { x: this.panMove.x, y: this.panMove.y };
|
|
17673
|
+
}
|
|
17674
|
+
this.panEvent(x, y, true);
|
|
17675
|
+
this.tempPanMove = null;
|
|
17676
|
+
}
|
|
17655
17677
|
}
|
|
17656
17678
|
else {
|
|
17657
17679
|
parent.togglePan = parent.currObjType.isCustomCrop = false;
|
|
@@ -17966,6 +17988,9 @@ var Transform = /** @__PURE__ @class */ (function () {
|
|
|
17966
17988
|
var cxtTbar = parent.element.querySelector('#' + parent.element.id + '_contextualToolbarArea');
|
|
17967
17989
|
canvasMaxHeight -= cxtTbar ? cxtTbar.clientHeight : 0;
|
|
17968
17990
|
}
|
|
17991
|
+
if (!isImgShape && parent.element.clientHeight === 0) {
|
|
17992
|
+
canvasMaxHeight = 0;
|
|
17993
|
+
}
|
|
17969
17994
|
if (isNullOrUndefined(isImgShape)) {
|
|
17970
17995
|
if (canvasMaxWidth > 30) {
|
|
17971
17996
|
canvasMaxWidth -= 30;
|
|
@@ -18002,7 +18027,7 @@ var Transform = /** @__PURE__ @class */ (function () {
|
|
|
18002
18027
|
}
|
|
18003
18028
|
return { width: cssMaxWidth, height: cssMaxHeight };
|
|
18004
18029
|
};
|
|
18005
|
-
Transform.prototype.updatePanPoints = function () {
|
|
18030
|
+
Transform.prototype.updatePanPoints = function (x, y) {
|
|
18006
18031
|
var parent = this.parent;
|
|
18007
18032
|
var tempActObj = extend({}, parent.activeObj, {}, true);
|
|
18008
18033
|
var tempDestLeft = parent.img.destLeft;
|
|
@@ -18012,6 +18037,10 @@ var Transform = /** @__PURE__ @class */ (function () {
|
|
|
18012
18037
|
}
|
|
18013
18038
|
var xDiff = this.panMove.x - this.tempPanMove.x;
|
|
18014
18039
|
var yDiff = this.panMove.y - this.tempPanMove.y;
|
|
18040
|
+
if (x || y) {
|
|
18041
|
+
xDiff = x;
|
|
18042
|
+
yDiff = y;
|
|
18043
|
+
}
|
|
18015
18044
|
parent.img.destLeft += xDiff;
|
|
18016
18045
|
parent.img.destTop += yDiff;
|
|
18017
18046
|
this.limitPan();
|
|
@@ -20516,14 +20545,16 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
20516
20545
|
* Enable or disable a panning on the Image Editor.
|
|
20517
20546
|
*
|
|
20518
20547
|
* @param {boolean} value - Specifies a value whether enable or disable panning.
|
|
20548
|
+
* @param {number} x - Optional, Specifies a value to pan the image horizontally.
|
|
20549
|
+
* @param {number} y - Optional, Specifies a value to pan the image vertically.
|
|
20519
20550
|
*
|
|
20520
20551
|
* @remarks
|
|
20521
20552
|
* This option will take into effect once the image's visibility is hidden when zooming an image or selection has been performed.
|
|
20522
20553
|
*
|
|
20523
20554
|
* @returns {void}.
|
|
20524
20555
|
*/
|
|
20525
|
-
ImageEditor.prototype.pan = function (value) {
|
|
20526
|
-
this.notify('transform', { prop: 'pan', onPropertyChange: false, value: { value: value } });
|
|
20556
|
+
ImageEditor.prototype.pan = function (value, x, y) {
|
|
20557
|
+
this.notify('transform', { prop: 'pan', onPropertyChange: false, value: { value: value, x: x, y: y } });
|
|
20527
20558
|
};
|
|
20528
20559
|
/**
|
|
20529
20560
|
* Zoom in or out on a point in the image editor.
|
|
@@ -24211,6 +24242,10 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
24211
24242
|
this.parent.showDialogPopup();
|
|
24212
24243
|
}
|
|
24213
24244
|
};
|
|
24245
|
+
ToolbarModule.prototype.triggerTbarClickEvent = function (args) {
|
|
24246
|
+
var clickEvent = { item: args.item, originalEvent: args.event };
|
|
24247
|
+
this.parent.trigger('toolbarItemClicked', clickEvent);
|
|
24248
|
+
};
|
|
24214
24249
|
ToolbarModule.prototype.renderAnnotationBtn = function (isContextualToolbar) {
|
|
24215
24250
|
var _this = this;
|
|
24216
24251
|
var parent = this.parent;
|
|
@@ -24300,6 +24335,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
24300
24335
|
}
|
|
24301
24336
|
},
|
|
24302
24337
|
select: function (args) {
|
|
24338
|
+
_this.triggerTbarClickEvent(args);
|
|
24303
24339
|
parent.okBtn();
|
|
24304
24340
|
var isCropSelection = false;
|
|
24305
24341
|
var splitWords;
|
|
@@ -24320,6 +24356,9 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
24320
24356
|
}
|
|
24321
24357
|
var obj = { currentFreehandDrawIndex: null };
|
|
24322
24358
|
parent.notify('freehand-draw', { prop: 'getCurrentFreehandDrawIndex', value: { obj: obj } });
|
|
24359
|
+
var prevObj = { shapeSettingsObj: {} };
|
|
24360
|
+
var shapeSettings;
|
|
24361
|
+
var shapeChangingArgs;
|
|
24323
24362
|
drpDownBtn.iconCss = 'e-icons ' + _this.getCurrentShapeIcon(args.item.id);
|
|
24324
24363
|
switch (args.item.id) {
|
|
24325
24364
|
case 'pen':
|
|
@@ -24327,6 +24366,12 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
24327
24366
|
parent.notify('draw', { prop: 'setTempCurrentFreehandDrawIndex', value: { tempCurrentFreehandDrawIndex: obj['currentFreehandDrawIndex'] } });
|
|
24328
24367
|
_this.currentToolbar = 'pen';
|
|
24329
24368
|
parent.freeHandDraw(true);
|
|
24369
|
+
parent.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: prevObj } });
|
|
24370
|
+
shapeSettings = prevObj['shapeSettingsObj'];
|
|
24371
|
+
shapeSettings.type = ShapeType.FreehandDraw;
|
|
24372
|
+
shapeChangingArgs = { cancel: false, action: 'insert', previousShapeSettings: shapeSettings,
|
|
24373
|
+
currentShapeSettings: shapeSettings };
|
|
24374
|
+
parent.notify('freehand-draw', { prop: 'triggerShapeChanging', value: { shapeChangingArgs: shapeChangingArgs } });
|
|
24330
24375
|
break;
|
|
24331
24376
|
case 'text':
|
|
24332
24377
|
_this.currentToolbar = 'text';
|
|
@@ -24336,12 +24381,22 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
24336
24381
|
_this.currentToolbar = 'shapes';
|
|
24337
24382
|
parent.element.querySelector('#' + id + '_fileUpload').click();
|
|
24338
24383
|
break;
|
|
24339
|
-
|
|
24384
|
+
case 'ellipse':
|
|
24385
|
+
case 'arrow':
|
|
24386
|
+
case 'line':
|
|
24387
|
+
case 'rectangle':
|
|
24388
|
+
case 'path':
|
|
24340
24389
|
_this.currentToolbar = 'shapes';
|
|
24341
24390
|
_this.setInitialShapeSettings(args);
|
|
24342
24391
|
parent.notify('selection', { prop: 'annotate', value: { shape: args.item.id } });
|
|
24343
24392
|
parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'shapes',
|
|
24344
24393
|
isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
|
|
24394
|
+
parent.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: prevObj } });
|
|
24395
|
+
shapeSettings = prevObj['shapeSettingsObj'];
|
|
24396
|
+
shapeChangingArgs = { cancel: false, action: 'insert', previousShapeSettings: shapeSettings,
|
|
24397
|
+
currentShapeSettings: shapeSettings };
|
|
24398
|
+
parent.trigger('shapeChanging', shapeChangingArgs);
|
|
24399
|
+
parent.notify('shape', { prop: 'updateShapeChangeEventArgs', value: { shapeSettings: shapeChangingArgs.currentShapeSettings } });
|
|
24345
24400
|
break;
|
|
24346
24401
|
}
|
|
24347
24402
|
_this.updateToolbarItems();
|
|
@@ -24447,6 +24502,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
24447
24502
|
},
|
|
24448
24503
|
items: items,
|
|
24449
24504
|
select: function (args) {
|
|
24505
|
+
_this.triggerTbarClickEvent(args);
|
|
24450
24506
|
_this.cropSelect(args);
|
|
24451
24507
|
drpDownBtn.iconCss = 'e-icons ' + _this.getCurrentShapeIcon('crop-' + args.item.id);
|
|
24452
24508
|
drpDownBtn.content = Browser.isDevice ? null : parent.toPascalCase(args.item.id);
|
|
@@ -24457,6 +24513,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
24457
24513
|
drpDownBtn.appendTo('#' + parent.element.id + '_cropBtn');
|
|
24458
24514
|
};
|
|
24459
24515
|
ToolbarModule.prototype.renderTransformBtn = function () {
|
|
24516
|
+
var _this = this;
|
|
24460
24517
|
var parent = this.parent;
|
|
24461
24518
|
var items = [];
|
|
24462
24519
|
if (isNullOrUndefined(parent.toolbar) || (parent.toolbar && parent.toolbar.indexOf('RotateLeft') > -1)) {
|
|
@@ -24481,12 +24538,17 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
24481
24538
|
elem.style.display = 'block';
|
|
24482
24539
|
}
|
|
24483
24540
|
},
|
|
24484
|
-
items: items,
|
|
24541
|
+
items: items,
|
|
24542
|
+
select: function (args) {
|
|
24543
|
+
_this.triggerTbarClickEvent(args);
|
|
24544
|
+
parent.transformSelect.bind(_this);
|
|
24545
|
+
},
|
|
24485
24546
|
iconCss: 'e-icons e-transform', cssClass: 'e-image-popup'
|
|
24486
24547
|
});
|
|
24487
24548
|
drpDownBtn.appendTo('#' + parent.element.id + '_transformBtn');
|
|
24488
24549
|
};
|
|
24489
24550
|
ToolbarModule.prototype.renderSaveBtn = function () {
|
|
24551
|
+
var _this = this;
|
|
24490
24552
|
var parent = this.parent;
|
|
24491
24553
|
var id = parent.element.id;
|
|
24492
24554
|
var saveItems = [
|
|
@@ -24499,6 +24561,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
24499
24561
|
// Initialize the DropDownButton component.
|
|
24500
24562
|
var saveDrpDownBtn = new DropDownButton({ items: saveItems, cssClass: 'e-caret-hide e-image-popup', iconCss: 'e-icons e-save',
|
|
24501
24563
|
select: function (args) {
|
|
24564
|
+
_this.triggerTbarClickEvent(args);
|
|
24502
24565
|
parent.export(args.item.text);
|
|
24503
24566
|
parent.isChangesSaved = true;
|
|
24504
24567
|
parent.notify('draw', { prop: 'redrawDownScale' });
|
|
@@ -24936,6 +24999,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
24936
24999
|
}
|
|
24937
25000
|
};
|
|
24938
25001
|
ToolbarModule.prototype.createShapeBtn = function (items) {
|
|
25002
|
+
var _this = this;
|
|
24939
25003
|
var parent = this.parent;
|
|
24940
25004
|
var id = parent.element.id;
|
|
24941
25005
|
if (items.indexOf('strokeWidth') > -1) {
|
|
@@ -24974,6 +25038,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
24974
25038
|
}
|
|
24975
25039
|
},
|
|
24976
25040
|
select: function (args) {
|
|
25041
|
+
_this.triggerTbarClickEvent(args);
|
|
24977
25042
|
spanElem_1.textContent = args.item.text;
|
|
24978
25043
|
parent.updateStrokeWidth(args.item.id);
|
|
24979
25044
|
if (Browser.isDevice) {
|
|
@@ -24997,6 +25062,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
24997
25062
|
}
|
|
24998
25063
|
};
|
|
24999
25064
|
ToolbarModule.prototype.createStartBtn = function () {
|
|
25065
|
+
var _this = this;
|
|
25000
25066
|
var parent = this.parent;
|
|
25001
25067
|
var id = parent.element.id;
|
|
25002
25068
|
var strokeWidthItems = [
|
|
@@ -25030,6 +25096,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
25030
25096
|
}
|
|
25031
25097
|
},
|
|
25032
25098
|
select: function (args) {
|
|
25099
|
+
_this.triggerTbarClickEvent(args);
|
|
25033
25100
|
spanElem.textContent = args.item.text;
|
|
25034
25101
|
parent.updateArrow('startArrow', args.item.id);
|
|
25035
25102
|
}
|
|
@@ -25038,6 +25105,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
25038
25105
|
drpDownBtn.appendTo('#' + id + '_startBtn');
|
|
25039
25106
|
};
|
|
25040
25107
|
ToolbarModule.prototype.createEndBtn = function () {
|
|
25108
|
+
var _this = this;
|
|
25041
25109
|
var parent = this.parent;
|
|
25042
25110
|
var id = parent.element.id;
|
|
25043
25111
|
var strokeWidthItems = [
|
|
@@ -25071,6 +25139,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
25071
25139
|
}
|
|
25072
25140
|
},
|
|
25073
25141
|
select: function (args) {
|
|
25142
|
+
_this.triggerTbarClickEvent(args);
|
|
25074
25143
|
spanElem.textContent = args.item.text;
|
|
25075
25144
|
parent.updateArrow('endArrow', args.item.id);
|
|
25076
25145
|
}
|
|
@@ -25269,6 +25338,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
25269
25338
|
}
|
|
25270
25339
|
};
|
|
25271
25340
|
ToolbarModule.prototype.createTextBtn = function (items) {
|
|
25341
|
+
var _this = this;
|
|
25272
25342
|
var parent = this.parent;
|
|
25273
25343
|
var id = parent.element.id;
|
|
25274
25344
|
if (items.indexOf('fontFamily') > -1) {
|
|
@@ -25309,6 +25379,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
25309
25379
|
}
|
|
25310
25380
|
},
|
|
25311
25381
|
select: function (args) {
|
|
25382
|
+
_this.triggerTbarClickEvent(args);
|
|
25312
25383
|
spanElem_2.textContent = args.item.text;
|
|
25313
25384
|
if (Browser.isDevice) {
|
|
25314
25385
|
spanElem_2.setAttribute('style', 'font-family:' + args.item.id);
|
|
@@ -25337,6 +25408,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
25337
25408
|
args.element.querySelector('[aria-label *= ' + '"' + activeBtn + '"' + ']').classList.add('e-selected-btn');
|
|
25338
25409
|
},
|
|
25339
25410
|
select: function (args) {
|
|
25411
|
+
_this.triggerTbarClickEvent(args);
|
|
25340
25412
|
fontSizeSpanElem_1.textContent = args.item.text;
|
|
25341
25413
|
parent.updateFontSize(args.item.text);
|
|
25342
25414
|
}
|
|
@@ -25770,6 +25842,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
25770
25842
|
parent.element.querySelector('.e-template.e-pen-stroke-color').appendChild(parent.createElement('input', {
|
|
25771
25843
|
id: id + '_pen_stroke'
|
|
25772
25844
|
}));
|
|
25845
|
+
var presentVal = parent.activeObj.strokeSettings.strokeColor;
|
|
25773
25846
|
var penColor = new ColorPicker({
|
|
25774
25847
|
modeSwitcher: false, value: '#fff',
|
|
25775
25848
|
showButtons: false, mode: 'Palette', cssClass: 'e-pen-color',
|
|
@@ -25795,6 +25868,9 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
25795
25868
|
}, '#' + id + '_penColorBtn');
|
|
25796
25869
|
penColor.inline = true;
|
|
25797
25870
|
penColor.value = penColor.getValue(parent.activeObj.strokeSettings.strokeColor, 'rgba');
|
|
25871
|
+
if (penColor.value === 'null') {
|
|
25872
|
+
penColor.value = presentVal;
|
|
25873
|
+
}
|
|
25798
25874
|
var obj = { tempFreeHandDrawEditingStyles: null };
|
|
25799
25875
|
parent.notify('freehand-draw', { prop: 'getTempFreeHandDrawEditingStyles', value: { obj: obj } });
|
|
25800
25876
|
var indexObj = { freehandSelectedIndex: null };
|
|
@@ -25811,6 +25887,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
25811
25887
|
}
|
|
25812
25888
|
};
|
|
25813
25889
|
ToolbarModule.prototype.createPenBtn = function (items) {
|
|
25890
|
+
var _this = this;
|
|
25814
25891
|
var parent = this.parent;
|
|
25815
25892
|
var id = parent.element.id;
|
|
25816
25893
|
var strokeWidthItems = [
|
|
@@ -25843,6 +25920,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
25843
25920
|
args.element.querySelector('[aria-label = ' + '"' + activeBtn + '"' + ']').classList.add('e-selected-btn');
|
|
25844
25921
|
},
|
|
25845
25922
|
select: function (args) {
|
|
25923
|
+
_this.triggerTbarClickEvent(args);
|
|
25846
25924
|
spanElem_3.textContent = args.item.text;
|
|
25847
25925
|
parent.updatePenStrokeWidth(args.item.id);
|
|
25848
25926
|
if (Browser.isDevice) {
|
|
@@ -26122,6 +26200,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
26122
26200
|
parent.element.querySelector('.e-stroke.e-template .e-dropdownbtn-preview').style.background = parent.frameObj.color;
|
|
26123
26201
|
};
|
|
26124
26202
|
ToolbarModule.prototype.createFrameSize = function () {
|
|
26203
|
+
var _this = this;
|
|
26125
26204
|
var parent = this.parent;
|
|
26126
26205
|
var prevFrameSettings;
|
|
26127
26206
|
var obj = { frameChangeEventArgs: null };
|
|
@@ -26152,6 +26231,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
26152
26231
|
}
|
|
26153
26232
|
},
|
|
26154
26233
|
select: function (args) {
|
|
26234
|
+
_this.triggerTbarClickEvent(args);
|
|
26155
26235
|
prevFrameSettings = { type: parent.toPascalCase(parent.frameObj.type), color: parent.frameObj.color,
|
|
26156
26236
|
gradientColor: parent.frameObj.gradientColor, size: parent.frameObj.size, inset: parent.frameObj.inset,
|
|
26157
26237
|
offset: parent.frameObj.offset, borderRadius: parent.frameObj.radius, frameLineStyle: parent.toPascalCase(parent.frameObj.border),
|
|
@@ -26197,6 +26277,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
26197
26277
|
drpDownBtn.appendTo('#' + id + '_frameSizeBtn');
|
|
26198
26278
|
};
|
|
26199
26279
|
ToolbarModule.prototype.createFrameInset = function () {
|
|
26280
|
+
var _this = this;
|
|
26200
26281
|
var parent = this.parent;
|
|
26201
26282
|
var prevFrameSettings;
|
|
26202
26283
|
var obj = { frameChangeEventArgs: null };
|
|
@@ -26227,6 +26308,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
26227
26308
|
}
|
|
26228
26309
|
},
|
|
26229
26310
|
select: function (args) {
|
|
26311
|
+
_this.triggerTbarClickEvent(args);
|
|
26230
26312
|
prevFrameSettings = { type: parent.toPascalCase(parent.frameObj.type), color: parent.frameObj.color,
|
|
26231
26313
|
gradientColor: parent.frameObj.gradientColor, size: parent.frameObj.size, inset: parent.frameObj.inset,
|
|
26232
26314
|
offset: parent.frameObj.offset, borderRadius: parent.frameObj.radius, frameLineStyle: parent.toPascalCase(parent.frameObj.border),
|
|
@@ -26272,6 +26354,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
26272
26354
|
drpDownBtn.appendTo('#' + id + '_frameInsetBtn');
|
|
26273
26355
|
};
|
|
26274
26356
|
ToolbarModule.prototype.createFrameOffset = function () {
|
|
26357
|
+
var _this = this;
|
|
26275
26358
|
var parent = this.parent;
|
|
26276
26359
|
var prevFrameSettings;
|
|
26277
26360
|
var obj = { frameChangeEventArgs: null };
|
|
@@ -26302,6 +26385,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
26302
26385
|
}
|
|
26303
26386
|
},
|
|
26304
26387
|
select: function (args) {
|
|
26388
|
+
_this.triggerTbarClickEvent(args);
|
|
26305
26389
|
prevFrameSettings = { type: parent.toPascalCase(parent.frameObj.type), color: parent.frameObj.color,
|
|
26306
26390
|
gradientColor: parent.frameObj.gradientColor, size: parent.frameObj.size, inset: parent.frameObj.inset,
|
|
26307
26391
|
offset: parent.frameObj.offset, borderRadius: parent.frameObj.radius, frameLineStyle: parent.toPascalCase(parent.frameObj.border),
|
|
@@ -26347,6 +26431,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
26347
26431
|
drpDownBtn.appendTo('#' + id + '_frameOffsetBtn');
|
|
26348
26432
|
};
|
|
26349
26433
|
ToolbarModule.prototype.createFrameRadius = function () {
|
|
26434
|
+
var _this = this;
|
|
26350
26435
|
var parent = this.parent;
|
|
26351
26436
|
var prevFrameSettings;
|
|
26352
26437
|
var obj = { frameChangeEventArgs: null };
|
|
@@ -26378,6 +26463,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
26378
26463
|
}
|
|
26379
26464
|
},
|
|
26380
26465
|
select: function (args) {
|
|
26466
|
+
_this.triggerTbarClickEvent(args);
|
|
26381
26467
|
prevFrameSettings = { type: parent.toPascalCase(parent.frameObj.type), color: parent.frameObj.color,
|
|
26382
26468
|
gradientColor: parent.frameObj.gradientColor, size: parent.frameObj.size, inset: parent.frameObj.inset,
|
|
26383
26469
|
offset: parent.frameObj.offset, borderRadius: parent.frameObj.radius, frameLineStyle: parent.toPascalCase(parent.frameObj.border),
|
|
@@ -26423,6 +26509,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
26423
26509
|
drpDownBtn.appendTo('#' + id + '_frameRadiusBtn');
|
|
26424
26510
|
};
|
|
26425
26511
|
ToolbarModule.prototype.createFrameAmount = function () {
|
|
26512
|
+
var _this = this;
|
|
26426
26513
|
var parent = this.parent;
|
|
26427
26514
|
var prevFrameSettings;
|
|
26428
26515
|
var obj = { frameChangeEventArgs: null };
|
|
@@ -26453,6 +26540,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
26453
26540
|
}
|
|
26454
26541
|
},
|
|
26455
26542
|
select: function (args) {
|
|
26543
|
+
_this.triggerTbarClickEvent(args);
|
|
26456
26544
|
prevFrameSettings = { type: parent.toPascalCase(parent.frameObj.type), color: parent.frameObj.color,
|
|
26457
26545
|
gradientColor: parent.frameObj.gradientColor, size: parent.frameObj.size, inset: parent.frameObj.inset,
|
|
26458
26546
|
offset: parent.frameObj.offset, borderRadius: parent.frameObj.radius, frameLineStyle: parent.toPascalCase(parent.frameObj.border),
|
|
@@ -26498,6 +26586,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
26498
26586
|
drpDownBtn.appendTo('#' + id + '_frameAmountBtn');
|
|
26499
26587
|
};
|
|
26500
26588
|
ToolbarModule.prototype.createFrameBorder = function () {
|
|
26589
|
+
var _this = this;
|
|
26501
26590
|
var parent = this.parent;
|
|
26502
26591
|
var prevFrameSettings;
|
|
26503
26592
|
var obj = { frameChangeEventArgs: null };
|
|
@@ -26526,6 +26615,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
|
|
|
26526
26615
|
}
|
|
26527
26616
|
},
|
|
26528
26617
|
select: function (args) {
|
|
26618
|
+
_this.triggerTbarClickEvent(args);
|
|
26529
26619
|
prevFrameSettings = { type: parent.toPascalCase(parent.frameObj.type), color: parent.frameObj.color,
|
|
26530
26620
|
gradientColor: parent.frameObj.gradientColor, size: parent.frameObj.size, inset: parent.frameObj.inset,
|
|
26531
26621
|
offset: parent.frameObj.offset, borderRadius: parent.frameObj.radius, frameLineStyle: parent.toPascalCase(parent.frameObj.border),
|