KendoSplitter / Angular:如何以编程方式设置分割器高度

时间:2015-01-23 13:52:31

标签: angularjs kendo-ui

In his plunk如果单击该按钮,KendoSplitter包装器高度将增加到1000px,并且会触发拆分器resize事件,但不会重新绘制拆分器。单击按钮后,尝试调整水平分隔线的大小,您将看到高度实际发生了变化。任何想法如何解决这个问题?

HTML:

<button ng-click="setHeight()">Increment Content2 Height</button>

<div id="div1" kendo-splitter="splitter1" 
         k-panes="[{collapsible: true, size: '120px'},{collapsible: true }]" 
         k-orientation="'horizontal'">

     <div kendo-splitter="splitter2"  
          k-panes="[{collapsible: true, size: '100px'},{collapsible: true}]" 
          k-orientation="'vertical'">
         <div>
             Content 11
         </div>
         <div>
             Content 12
         </div>
    </div>
    <div>
         Content 2
    </div>
</div>

使用Javascript:

  $scope.setHeight = function() {
        $scope.splitter1.wrapper.height(1000);
        $scope.splitter1.trigger("resize");
  };

1 个答案:

答案 0 :(得分:0)

$scope.splitter1.trigger("resize");不再受支持。
而是使用:kendo.resize($($scope.splitter1.wrapper[0]));