Fixed default frametype to image

This commit is contained in:
Erik Tiekstra
2017-05-18 09:46:04 +02:00
parent 032b4db4d4
commit a31de5835d
@@ -18,7 +18,7 @@ function FrameHandler(viewport) {
* Sets the 4 rectangles which are used when current canvas should be framed * Sets the 4 rectangles which are used when current canvas should be framed
*/ */
function initFrames() { function initFrames() {
var frame = new fabric.Rect({ fill: '#000', stroke: '#000000', width: 1, height: 1 }); var frame = new fabric.Rect({ fill: '#000000', stroke: '#000000', width: 1, height: 1 });
_frames = { _frames = {
top: frame.clone(), top: frame.clone(),
@@ -54,7 +54,7 @@ function FrameHandler(viewport) {
* @return {FrameHandler} * @return {FrameHandler}
*/ */
this.setFrames = function (frameType) { this.setFrames = function (frameType) {
frameType = frameType || _frameType; frameType = frameType || _frameType || 'image';
_frameType = frameType; _frameType = frameType;
if (!frameType) { if (!frameType) {