/* * Paper.js * * This file is part of Paper.js, a JavaScript Vector Graphics Library, * based on Scriptographer.org and designed to be largely API compatible. * http://paperjs.org/ * http://scriptographer.org/ * * Distributed under the MIT license. See LICENSE file for details. * * Copyright (c) 2011, Juerg Lehni & Jonathan Puckey * http://lehni.org/ & http://jonathanpuckey.com/ * * All rights reserved. */ var Symbol = this.Symbol = Base.extend({ beans: true, initialize: function(item) { this.project = paper.project; this.project.symbols.push(this); this.setDefinition(item); }, clone: function() { return new Symbol(this._definition.clone()); }, // TODO: remove() getDefinition: function() { return this._definition; }, setDefinition: function(item) { this._definition = item; item.selected = false; item._removeFromParent(); // Move position to 0, 0. TODO: Why? item.setPosition(new Point()); } });