Guest User

Untitled

a guest
Apr 21st, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. var underscore = require('underscore');
  2. var $ = require('jquery')(window);
  3. var Backbone = require('backbone');
  4. Backbone.$ = $;
  5.  
  6. //Define The Model
  7.  
  8. $(function () {
  9. var Shape = Backbone.Model.extend({
  10. defaults: {x: 40, y: 40, width: 100, height: 100, color: 'brown'},
  11. setTopLeft: function (x, y) {
  12. this.set({x: x, y: y});
  13. },
  14. setDim: function (w, h) {
  15. this.set({width: w, height: h});
  16. },
  17. isCircle: function () {
  18. return !!this.get('circle');
  19. }
  20. });
  21. });
  22.  
  23. var $ = require('jquery');
Add Comment
Please, Sign In to add comment