Everything is green
This commit is contained in:
@@ -15,12 +15,12 @@ App.SectionTableView = Ember.View.extend DragNDrop.Draggable,
|
||||
).property('content.id')
|
||||
offsetX: (->
|
||||
return 0 unless section_width = @get('content.section.width')
|
||||
((@get('content.position_x') || 0) * @get('containerWidth') / section_width) - 40
|
||||
((@get('content.position_x') || 0) * @get('containerWidth') / section_width)
|
||||
).property('content.section.width', 'content.position_x', 'containerWidth')
|
||||
offsetY: (->
|
||||
return 0 unless section_height = @get('content.section.height')
|
||||
# debugger if @get('content.number') == 11
|
||||
((@content.get('position_y') || 0) * @get('containerHeight') / section_height) - 20
|
||||
((@content.get('position_y') || 0) * @get('containerHeight') / section_height)
|
||||
).property('content.section.height', 'content.position_y', 'containerHeight')
|
||||
|
||||
style: (->
|
||||
@@ -35,8 +35,8 @@ App.SectionTableView = Ember.View.extend DragNDrop.Draggable,
|
||||
#@$el.css 'left', position.left
|
||||
#@$el.css 'top', position.top
|
||||
@content.setProperties
|
||||
position_x: position.left*@content.get('section').get('width') / @containerWidth()
|
||||
position_y: position.top *@content.get('section').get('height') / @containerHeight()
|
||||
position_x: position.left*@get('content.section.width') / @get('containerWidth')
|
||||
position_y: position.top *@get('content.section.height') / @get('containerHeight')
|
||||
#@content.get('transaction').commit()
|
||||
@content.save()
|
||||
containerWidth: (-> @get('parentView.element_width') ).property('parentView.element_width')
|
||||
|
||||
Reference in New Issue
Block a user