Angular / ngDraggable - 父DIV在拖动对象时不滚动

时间:2016-08-22 19:14:39

标签: angularjs drag-and-drop angular-material

使用ngDraggable / Angular Material并在父DIV容器中拖动对象时遇到问题。

DIV样式具有已定义的高度和#34; scroll"的溢出,并且数据是员工列表。

当我将对象拖到列表中时,我期待DIV标记滚动,但滚动不会触发。

坚持寻求解决方案。任何帮助,将不胜感激。以下代码段是我的代码的精简示例。



.allEmployeeContainer {
    height: 500px;
    overflow-y: scroll;
}

.employeeHolder{
    display: inline-block;
    width:100%;
    font-weight: normal;
    font-size: 10.5pt;
    padding:10px 0px 10px 0px;
    margin:0px;    
}

<div class="allEmployeeContainer">
    <div ng-repeat="employee in someCtrl.employees" style="padding:0px; margin:0px" >
        <div class="employeeHolder" layout="row" layout-wrap>
            <div style="width:100%; margin-top:10px;" layout="row" layout-wrap>
                <div flex="15">
                    <div class="drag-object" ng-drag="true" ng-drag-data="clip"></div><br />
                </div>
                <div flex>{{employee.firstName}}</div>
                <div flex>{{employee.lastName}}</div>
            </div>
        </div>
    </div>
</div>
&#13;
&#13;
&#13;

0 个答案:

没有答案
相关问题