Browse Source

Hide properly the toolbat on preview on. Fixes #3209

pull/3217/head
Artur Arseniev 5 years ago
parent
commit
f8d3e988d8
  1. 5
      src/commands/view/Preview.js

5
src/commands/view/Preview.js

@ -19,7 +19,10 @@ export default {
const { em } = this;
const mthEv = on ? 'on' : 'off';
if (em) {
const body = em.get('Canvas').getBody();
const canvas = em.get('Canvas');
const body = canvas.getBody();
const tlb = canvas.getToolbarEl();
tlb && (tlb.style.display = on ? 'none' : '');
const elP = body.querySelectorAll(`.${this.ppfx}no-pointer`);
each(elP, item => (item.style.pointerEvents = on ? 'all' : ''));
em[mthEv]('run:tlb-move:before', this.preventDrag);

Loading…
Cancel
Save