@dvrd/dvr-controls 1.0.20 → 1.0.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dvrd/dvr-controls",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "Custom web controls",
5
5
  "main": "index.ts",
6
6
  "files": ["src/**/*"],
@@ -180,8 +180,9 @@ export default class PdfText extends PdfElement<Props, State> {
180
180
  this.initialWidth = this.initialWidth ?? this.field.scrollWidth;
181
181
  if (this.field.scrollWidth > maxWidth && this.draggable) {
182
182
  this.draggable.setPosition({x: PAGE_WIDTH - this.field.scrollWidth}, () => {
183
- dispatchCustomEvent('onLinkedElementMoved',
184
- {position: this.draggable.getPosition(), id: linkedID, elementId: this.id});
183
+ if (this.draggable)
184
+ dispatchCustomEvent('onLinkedElementMoved',
185
+ {position: this.draggable.getPosition(), id: linkedID, elementId: this.id});
185
186
  });
186
187
  }
187
188
  }