|
|
|
@ -1,7 +1,6 @@ |
|
|
|
import { isUndefined } from 'underscore'; |
|
|
|
import { CanvasSpotBuiltInTypes } from '../../canvas/model/CanvasSpot'; |
|
|
|
import { $ } from '../../common'; |
|
|
|
import { isTextNode } from '../../utils/dom'; |
|
|
|
import { CommandObject } from './CommandAbstract'; |
|
|
|
|
|
|
|
export default { |
|
|
|
@ -18,11 +17,7 @@ export default { |
|
|
|
const zoom = this.em.getZoomDecimal(); |
|
|
|
const el = opt.el as HTMLElement | undefined; |
|
|
|
|
|
|
|
if (!(el instanceof HTMLElement)) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (!config.showOffsets || !el || isTextNode(el) || (!config.showOffsetsSelected && state == 'Fixed')) { |
|
|
|
if (!config.showOffsets || !(el instanceof HTMLElement) || (!config.showOffsetsSelected && state == 'Fixed')) { |
|
|
|
editor.stopCommand(`${this.id}`, opts); |
|
|
|
return; |
|
|
|
} |
|
|
|
|