@syncfusion/ej2-image-editor 31.2.2 → 31.2.10

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.
@@ -12223,6 +12223,29 @@ class Selection {
12223
12223
  const cursor = parent.activeObj.shape && parent.activeObj.shape === 'text' ?
12224
12224
  parent.cursor : 'default';
12225
12225
  const tempCursor = parent.upperCanvas.style.cursor;
12226
+ const textArea = document.querySelector('#' + parent.element.id + '_textArea');
12227
+ if (textArea.style.display === 'block' || textArea.style.display === 'inline-block') {
12228
+ let isShapeUnderCursor = false;
12229
+ for (let i = 0; i < parent.objColl.length; i++) {
12230
+ const actObj = parent.objColl[i];
12231
+ if (actObj && actObj.shape && actObj.activePoint) {
12232
+ const activePoint = actObj.activePoint;
12233
+ const startX = activePoint.startX;
12234
+ const startY = activePoint.startY;
12235
+ const endX = activePoint.endX;
12236
+ const endY = activePoint.endY;
12237
+ const radius = actObj.topLeftCircle && actObj.topLeftCircle.radius ? actObj.topLeftCircle.radius : 0;
12238
+ let isCursorWithinBounds = (x >= (startX - (radius * 2)) && x <= (endX + (radius * 2)) &&
12239
+ y >= (startY - (radius * 2)) && y <= (endY + (radius * 2)));
12240
+ if (isCursorWithinBounds) {
12241
+ isShapeUnderCursor = true;
12242
+ }
12243
+ }
12244
+ }
12245
+ if (isShapeUnderCursor) {
12246
+ parent.okBtn();
12247
+ }
12248
+ }
12226
12249
  if (parent.isResize) {
12227
12250
  this.performEnterAction(e);
12228
12251
  parent.upperCanvas.style.cursor = 'default';
@@ -15362,10 +15385,11 @@ class Shape {
15362
15385
  parent.activeObj.textSettings.text = text || parent.activeObj.textSettings.text;
15363
15386
  parent.activeObj.textSettings.fontFamily = fontFamily || parent.activeObj.textSettings.fontFamily;
15364
15387
  parent.activeObj.textSettings.fontSize = fontSize || parent.activeObj.textSettings.fontSize;
15365
- parent.activeObj.textSettings.bold = bold || parent.activeObj.textSettings.bold;
15366
- parent.activeObj.textSettings.italic = italic || parent.activeObj.textSettings.italic;
15367
- parent.activeObj.textSettings.underline = underline || parent.activeObj.textSettings.underline;
15368
- parent.activeObj.textSettings.strikethrough = strikethrough || parent.activeObj.textSettings.strikethrough;
15388
+ parent.activeObj.textSettings.bold = !isNullOrUndefined(bold) ? bold : parent.activeObj.textSettings.bold;
15389
+ parent.activeObj.textSettings.italic = !isNullOrUndefined(italic) ? italic : parent.activeObj.textSettings.italic;
15390
+ parent.activeObj.textSettings.underline = !isNullOrUndefined(underline) ? underline : parent.activeObj.textSettings.underline;
15391
+ parent.activeObj.textSettings.strikethrough = !isNullOrUndefined(strikethrough) ?
15392
+ strikethrough : parent.activeObj.textSettings.strikethrough;
15369
15393
  parent.activeObj.strokeSettings.outlineColor = outlineColor || parent.activeObj.strokeSettings.outlineColor;
15370
15394
  parent.activeObj.strokeSettings.outlineWidth = outlineWidth || parent.activeObj.strokeSettings.outlineWidth;
15371
15395
  }