P5-1471. Image should be centered when you open the page on ipad.
This commit is contained in:
@@ -18,7 +18,7 @@ var $document = $(document);
|
||||
* Fe. getDragbars method can be called from most places as the Canvas class is available in most places.
|
||||
*/
|
||||
var Canvas = fabric.util.createClass(fabric.Canvas, {
|
||||
initialize: function (id) {
|
||||
initialize: function (id, dimensions) {
|
||||
this.callSuper('initialize', id, {
|
||||
enableRetinaScaling: true,
|
||||
renderOnAddRemove: false,
|
||||
@@ -26,8 +26,8 @@ var Canvas = fabric.util.createClass(fabric.Canvas, {
|
||||
backgroundColor: '#d2d2d2',
|
||||
preserveObjectStacking: true,
|
||||
selection: false,
|
||||
width: 1253,
|
||||
height: 600
|
||||
width: dimensions.width,
|
||||
height: dimensions.height
|
||||
});
|
||||
|
||||
// Eventhandler for mouseup events on the whole canvas.
|
||||
|
||||
@@ -23,7 +23,7 @@ function ImageEditor(canvasId, args) {
|
||||
}, args);
|
||||
|
||||
// Initialize canvas
|
||||
_canvas = new Canvas(canvasId);
|
||||
_canvas = new Canvas(canvasId, args.dimensions);
|
||||
|
||||
// Let Canvas know which type it is, canvas or wallpaper since it is
|
||||
// accessible for all objects contained within.
|
||||
|
||||
Reference in New Issue
Block a user