Display drawing zoom

This commit is contained in:
Jordan Watkins 2017-10-22 15:10:35 -07:00 committed by Julian Descottes
parent 2f2b4cd9ba
commit 4ebf43fda4
2 changed files with 12 additions and 0 deletions

View File

@ -86,6 +86,12 @@
font-family:monospace; font-family:monospace;
} }
.cursor-coordinates .drawing-zoom {
position: absolute;
top: -20px;
left: 1px;
}
/** /**
* Canvases layout * Canvases layout
*/ */

View File

@ -17,6 +17,7 @@
$.subscribe(Events.DRAG_START, this.onDragStart_.bind(this)); $.subscribe(Events.DRAG_START, this.onDragStart_.bind(this));
$.subscribe(Events.DRAG_END, this.onDragEnd_.bind(this)); $.subscribe(Events.DRAG_END, this.onDragEnd_.bind(this));
$.subscribe(Events.FRAME_SIZE_CHANGED, this.redraw.bind(this)); $.subscribe(Events.FRAME_SIZE_CHANGED, this.redraw.bind(this));
$.subscribe(Events.ZOOM_CHANGED, this.redraw.bind(this));
this.redraw(); this.redraw();
}; };
@ -39,6 +40,11 @@
} }
} }
if (pskl.app.drawingController) {
var zoom = pskl.app.drawingController.compositeRenderer.getZoom().toFixed(2);
html += '<div class="drawing-zoom">x' + zoom + '</div>';
}
this.coordinatesContainer.innerHTML = this.getFrameSizeHTML_() + html; this.coordinatesContainer.innerHTML = this.getFrameSizeHTML_() + html;
}; };