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;
|
||||
},
|
||||
|
||||
/**
|
||||
* Reloads the 3D view, if it is present
|
||||
* @return {Canvas}
|
||||
*/
|
||||
refresh3dView: function () {
|
||||
if (this.get3dHandler().isEnabled()) {
|
||||
this.toggle3D(true);
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* @return {Canvas}
|
||||
*/
|
||||
|
||||
@@ -140,9 +140,7 @@ function Viewport(canvas) {
|
||||
*/
|
||||
this.setFrame = function (frameType) {
|
||||
this.getFrameHandler().setFrames(frameType);
|
||||
if (canvas.get3dHandler().isEnabled()) {
|
||||
canvas.toggle3D(true);
|
||||
}
|
||||
canvas.refresh3dView();
|
||||
};
|
||||
|
||||
this.getData = function () {
|
||||
|
||||
Reference in New Issue
Block a user