Commit c6e57d64 by Torkel Ödegaard

moved binding expression for panel width to directive

parent dc3cd430
......@@ -116,4 +116,14 @@ function (angular, app, _) {
};
});
module.directive('panelWidth', function() {
return function(scope, element) {
scope.$watch('panel.span', function() {
element[0].style.width = ((scope.panel.span / 1.2) * 10) + '%';
});
};
});
});
......@@ -101,8 +101,8 @@
<div ng-repeat="(name, panel) in row.panels"
class="panel nospace"
style="position:relative"
ng-style="{'width':(panel.span/1.2)*10+'%'}"
data-drop="true"
panel-width
ng-model="panel"
data-jqyoui-options
jqyoui-droppable="{index:$index,mutate:false,onDrop:'panelMoveDrop',onOver:'panelMoveOver(true)',onOut:'panelMoveOut'}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment