Begin implement canvas editor
This commit is contained in:
@@ -12,6 +12,11 @@ function ImageEditor(canvasId, args) {
|
||||
|
||||
// Initialize canvas
|
||||
_canvas = new Canvas(canvasId);
|
||||
// Let Canvas know which type it is, canvas or wallpaper since it is
|
||||
// accessible for all objects contained within.
|
||||
_canvas.set({
|
||||
__type: _settings.type
|
||||
});
|
||||
|
||||
_canvas.getButtonMenu()
|
||||
.addItem(['Show Murals Panel', 'Hide Murals Panel'], function () {
|
||||
|
||||
@@ -22,7 +22,7 @@ function Viewport(canvas) {
|
||||
width: _data.width,
|
||||
height: _data.height,
|
||||
stroke: '#fff',
|
||||
strokeWidth: _borderWidth,
|
||||
strokeWidth: canvas.__type === 'canvas' ? 0 : _borderWidth
|
||||
});
|
||||
|
||||
_rect.width += _borderWidth;
|
||||
@@ -34,7 +34,12 @@ function Viewport(canvas) {
|
||||
.drag.enable(calcMinMaxBoundsForRect(_rect.getInsideBoundingRect(), canvas.getImage()));
|
||||
canvas.getApertures().apply(_data.axis, _rect.getBoundingRect());
|
||||
|
||||
drawBeams();
|
||||
if (canvas.__type !== 'canvas') {
|
||||
drawBeams();
|
||||
} else {
|
||||
// drawFrames
|
||||
}
|
||||
|
||||
canvas.getDragbars().apply();
|
||||
|
||||
// Apertures sometimes overlaps the viewports bounding rect.
|
||||
|
||||
Reference in New Issue
Block a user