/** * Selection * Built-in selection object */ var Selection = function(){}; $.extend(Selection,{ // defaults: {{{ defaults: { minSize: [ 8, 8 ], maxSize: [ 0, 0 ], aspectRatio: 0, edge: { n: 0, s: 0, e: 0, w: 0 }, bgColor: null, bgOpacity: null, last: null, state: null, active: true, linked: true, canDelete: true, canDrag: true, canResize: true, canSelect: true }, // }}} prototype: { // init: function(core){{{ init: function(core){ this.core = core; this.startup(); this.linked = this.core.opt.linked; this.attach(); this.setOptions(this.core.opt); core.container.trigger('cropcreate',[this]); }, // }}} // attach: function(){{{ attach: function(){ // For extending init() sequence }, // }}} // startup: function(){{{ startup: function(){ var t = this, o = t.core.opt; $.extend(t,Selection.defaults); t.filter = t.core.getDefaultFilters(); t.element = $('
').addClass(o.css_selection).data({ selection: t }); t.frame = $('