Drawer now works when the page is rtl

This commit is contained in:
Ian Gilman 2013-08-15 12:54:32 -07:00
parent 26ad522f59
commit 6669589e5e

View File

@ -130,6 +130,10 @@ $.Drawer = function( options ) {
this.normHeight = this.source.dimensions.y / this.source.dimensions.x;
this.element = this.container;
// We force our container to ltr because our drawing math doesn't work in rtl.
// This issue only affects our canvas renderer, but we do it always for consistency.
// Note that this means overlays you want to be rtl need to be explicitly set to rtl.
this.container.dir = 'ltr';
this.canvas.style.width = "100%";
this.canvas.style.height = "100%";