Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

39 lines (28 sloc) 0.827 kB
class AreaTitle extends Spine.Controller
className: 'areaTitle'
change: (area) ->
@html("width: #{area.width}px   height: #{area.height}px")
move: (position) ->
@el.css(left: position.left, top: position.top)
class Resizing extends Spine.Controller
events:
'start.resize': 'resizeStart'
'resize.element': 'resized'
'end.resize': 'resizeEnd'
constructor: (@stage) ->
super(el: @stage.el)
resizeStart: ->
@stage.history.record()
resized: (e, element) ->
area = element.area()
unless @areaTitle
@append(@areaTitle = new AreaTitle)
@areaTitle.move(
left: area.left + area.width + 10,
top: area.top + area.height + 10
)
@areaTitle.change(area)
resizeEnd: ->
@areaTitle?.release()
@areaTitle = null
module.exports = Resizing
Jump to Line
Something went wrong with that request. Please try again.