Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var underscore = require('underscore');
- var $ = require('jquery')(window);
- var Backbone = require('backbone');
- Backbone.$ = $;
- //Define The Model
- $(function () {
- var Shape = Backbone.Model.extend({
- defaults: {x: 40, y: 40, width: 100, height: 100, color: 'brown'},
- setTopLeft: function (x, y) {
- this.set({x: x, y: y});
- },
- setDim: function (w, h) {
- this.set({width: w, height: h});
- },
- isCircle: function () {
- return !!this.get('circle');
- }
- });
- });
- var $ = require('jquery');
Add Comment
Please, Sign In to add comment