g
This commit is contained in:
@@ -15,12 +15,13 @@ App.SectionTableView = Ember.View.extend DragNDrop.Draggable,
|
||||
).property('content.id')
|
||||
offsetX: (->
|
||||
return 0 unless section_width = @get('content.section.width')
|
||||
(@content.get('position_x') || 0) * @containerWidth() / section_width
|
||||
).property('content.section.width', 'content.position_x')
|
||||
((@get('content.position_x') || 0) * @get('containerWidth') / section_width) - 40
|
||||
).property('content.section.width', 'content.position_x', 'containerWidth')
|
||||
offsetY: (->
|
||||
return 0 unless section_height = @get('content.section.height')
|
||||
(@content.get('position_y') || 0) * @containerHeight() / section_height
|
||||
).property('content.section.height', 'content.position_y')
|
||||
# debugger if @get('content.number') == 11
|
||||
((@content.get('position_y') || 0) * @get('containerHeight') / section_height) - 20
|
||||
).property('content.section.height', 'content.position_y', 'containerHeight')
|
||||
|
||||
style: (->
|
||||
"position:absolute;width:83px;height:48px;left:#{@get('offsetX')}px;top:#{@get('offsetY')}px"
|
||||
@@ -38,10 +39,11 @@ App.SectionTableView = Ember.View.extend DragNDrop.Draggable,
|
||||
position_y: position.top *@content.get('section').get('height') / @containerHeight()
|
||||
#@content.get('transaction').commit()
|
||||
@content.save()
|
||||
containerWidth: ->
|
||||
$(@get('parentView.element')).width()
|
||||
containerHeight: ->
|
||||
$(@get('parentView.element')).height()
|
||||
containerWidth: (-> @get('parentView.element_width') ).property('parentView.element_width')
|
||||
containerHeight: (-> @get('parentView.element_height') ).property('parentView.element_height')
|
||||
# $(@get('parentView.element')).width()
|
||||
# containerHeight: ->
|
||||
# $(@get('parentView.element')).height()
|
||||
#click: ->
|
||||
#@$('.table-actions').show()
|
||||
didInsertElement: ->
|
||||
|
||||
Reference in New Issue
Block a user