Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 7 additions & 29 deletions assets/javascripts/app/controllers/element/resizing.module.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -62,40 +62,18 @@ class Resizing extends Spine.Controller
resize: (e, type, position, lockAR) ->
area = @element.area()

switch type
when 'tl'
area.width -= position.left
area.height -= position.top
switch type[0]
when 't'
area.top += position.top
area.left += position.left

when 'tt'
area.height -= position.top
area.top += position.top

when 'tr'
area.width += position.left
area.height -= position.top
area.top += position.top

when 'rr'
area.width += position.left

when 'br'
area.width += position.left
area.height += position.top

when 'bb'
area.height += position.top

when 'bl'
area.width -= position.left
when 'b'
area.height += position.top
area.left += position.left

when 'll'
switch type[1]
when 'l'
area.width -= position.left
area.left += position.left
when 'r'
area.width += position.left

if lockAR
# TODO - FIXME, this doesn't lock AR properly
Expand Down