Last active
December 21, 2015 18:39
-
-
Save IanWhalen/6348450 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NewRect = fabric.util.createClass(fabric.Rect, { | |
type: 'newRect', | |
initialize: function(options) { | |
options || (options = { }); | |
console.log('initializing NewRect'); | |
this.callSuper('initialize', options); | |
} | |
}); | |
NewCanvas = fabric.util.createClass(fabric.Canvas, { | |
type: 'newCanvas', | |
initialize: function(el, options) { | |
options || (options = { }); | |
console.log('initializing NewCanvas'); | |
this.callSuper('initialize', el, options); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('Starting to load custom objects'); | |
newRect = new NewRect(); | |
console.log(newRect); | |
newCanvas = new NewCanvas('canvasId'); | |
console.log(newCanvas); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment