 {Emitter} = require 'event-kit'
 ObjectAssign = require 'object-assign'
+Delegator = require 'delegato'
 
 Transform = require './transform'
 Utils = require './utils'

    @_setupSVGObject(options)
    @model.on 'change', @onModelChange
    @svgDocument.registerObject(this)

  on: (args...) -> @emitter.on(args...)

  ###
  Section: Public Methods

module.exports =
class Rectangle
  Draggable.includeInto(this)
  Delegator.includeInto(this)

  @delegatesMethods 'on', toProperty: 'emitter'
  @delegatesMethods 'getPathString',
    'getPosition', 'setPosition'
    'getSize', 'setSize'
    'translate'
    toProperty: 'model'

  constructor: (@svgDocument, options={}) ->
    @emitter = new Emitter
