Javascript 获取阻力&;下降位置
我使用angular js dragula进行拖放 我需要保存位置,因为用户选择自定义div位置。 这就是我的html的外观Javascript 获取阻力&;下降位置,javascript,css,angularjs,angular-dragula,Javascript,Css,Angularjs,Angular Dragula,我使用angular js dragula进行拖放 我需要保存位置,因为用户选择自定义div位置。 这就是我的html的外观 <div class='wrapper'> <div class='container' dragula='"first-bag"'> <div>You can move these elements between these two containers</div> <div>Moving
<div class='wrapper'>
<div class='container' dragula='"first-bag"'>
<div>You can move these elements between these two containers</div>
<div>Moving them anywhere else isn't quite possible</div>
<div>There's also the possibility of moving elements around in the same container, changing their position</div>
</div>
</div>
这是plunker,打开控制台看看会发生什么。
请,如果有人知道如何在每个拖放保存div命令,所以下次当用户回来获得保存的位置。Thnx
$scope.$on('first-bag.over', function (e, el) {
el.addClass('over');
console.log(e);
console.log(el);
})
$scope.$on('first-bag.out', function (e, el) {
el.removeClass('over');
console.log(e);
console.log(el);
});