|
|
|
@ -231,7 +231,7 @@ module.exports = () => { |
|
|
|
* Triggered when the offset of the editor is changed |
|
|
|
* @private |
|
|
|
*/ |
|
|
|
udpatePosition() { |
|
|
|
updatePosition() { |
|
|
|
const un = 'px'; |
|
|
|
const canvas = config.em.get('Canvas'); |
|
|
|
const pos = canvas.getTargetToElementDim(toolbar, lastEl, { |
|
|
|
@ -272,10 +272,10 @@ module.exports = () => { |
|
|
|
rte = customRte ? customRte.enable(el, rte) : this.initRte(el).enable(); |
|
|
|
|
|
|
|
if (em) { |
|
|
|
setTimeout(this.udpatePosition.bind(this), 0); |
|
|
|
setTimeout(this.updatePosition.bind(this), 0); |
|
|
|
const event = 'change:canvasOffset canvasScroll'; |
|
|
|
em.off(event, this.udpatePosition, this); |
|
|
|
em.on(event, this.udpatePosition, this); |
|
|
|
em.off(event, this.updatePosition, this); |
|
|
|
em.on(event, this.updatePosition, this); |
|
|
|
em.trigger('rte:enable', view, rte); |
|
|
|
} |
|
|
|
|
|
|
|
|