Add method to Canvas for refreshing the 3D view
This commit is contained in:
@@ -104,6 +104,17 @@ var Canvas = fabric.util.createClass(fabric.Canvas, {
|
|||||||
return this.__buttonMenu;
|
return this.__buttonMenu;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reloads the 3D view, if it is present
|
||||||
|
* @return {Canvas}
|
||||||
|
*/
|
||||||
|
refresh3dView: function () {
|
||||||
|
if (this.get3dHandler().isEnabled()) {
|
||||||
|
this.toggle3D(true);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {Canvas}
|
* @return {Canvas}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -140,9 +140,7 @@ function Viewport(canvas) {
|
|||||||
*/
|
*/
|
||||||
this.setFrame = function (frameType) {
|
this.setFrame = function (frameType) {
|
||||||
this.getFrameHandler().setFrames(frameType);
|
this.getFrameHandler().setFrames(frameType);
|
||||||
if (canvas.get3dHandler().isEnabled()) {
|
canvas.refresh3dView();
|
||||||
canvas.toggle3D(true);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.getData = function () {
|
this.getData = function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user