dragula

How to replicate .sortable and serialize but with Dragula JS?

╄→尐↘猪︶ㄣ 提交于 2019-12-11 13:37:24
问题 I'm trying to understand how to replicate this code: $(this).on('submit', '#form', function(event) { var input = $("<input>") .attr("type", "hidden") .attr("name", "token_used") .val($('#right1').sortable('serialize')); console.log($('#right1').sortable('serialize')); $('#form').append($(input)); }); to be used with Dragula JS https://github.com/bevacqua/dragula (in vanilla Java Script) instead. I dont understand how to use dragulaJS for the call .sortable and then serialize. Any suggestion

get id of dropped div using dragula javascript

江枫思渺然 提交于 2019-12-11 06:07:39
问题 I am trying to update a c3.js chart using drag and drops with dragula.js, but I don't know how to get the id of the div that is dragged into a new container. My html is something like this: <div id="collapse1" class="panel-collapse collapse"> <div id="color1" class="form-inline">1</div> <div id="color2" class="form-inline">2</div> <div id="color3" class="form-inline">3</div> </div> <div id="collapse2" class="panel-collapse collapse"> </div> and I'm using dragula.js to drag and drop: dragula(

WebDriver Drag and Drop in application using Dragula

蓝咒 提交于 2019-12-07 20:36:53
问题 My company has a new application that incorporates drag and drop. The drag and drop is done via the Dragula library. I'm trying to automate this functionality, but I'm not having any luck. I have tried both WebDriver's built in DragAndDrop() method (which my understanding is it doesn't normally work so well with modern web tech). I tried constructing my own Drag and Drop with Actions. And I've also tried using jquery in the javascript executor. Neither of these methods have worked. Anyone

ng2-dragula [dragula] (angular2 drag and drop) - *ngFor with [dragulaModel] attribute not working

為{幸葍}努か 提交于 2019-12-07 04:30:39
问题 Using ng2-dragula drag and drop wrapper library for angular 2 dragula. https://github.com/valor-software/ng2-dragula Seeing issues with the [dragulaModel]='myList' ... when the item gets dropped ... poof ... it disappears. Inspecting the element, I see it remains in model, but the DOM element loses its inner html (becomes empty div) - causing the div to "appear" to be hidden. import { Component } from '@angular/core'; import { DragulaService } from 'ng2-dragula/ng2-dragula'; @Component({

WebDriver Drag and Drop in application using Dragula

余生颓废 提交于 2019-12-06 10:25:23
My company has a new application that incorporates drag and drop. The drag and drop is done via the Dragula library. I'm trying to automate this functionality, but I'm not having any luck. I have tried both WebDriver's built in DragAndDrop() method (which my understanding is it doesn't normally work so well with modern web tech). I tried constructing my own Drag and Drop with Actions. And I've also tried using jquery in the javascript executor. Neither of these methods have worked. Anyone have any suggestions? If DragAndDrop() method didn't work for you can build your own using other methods

ng2-dragula [dragula] (angular2 drag and drop) - *ngFor with [dragulaModel] attribute not working

浪子不回头ぞ 提交于 2019-12-05 06:19:49
Using ng2-dragula drag and drop wrapper library for angular 2 dragula. https://github.com/valor-software/ng2-dragula Seeing issues with the [dragulaModel]='myList' ... when the item gets dropped ... poof ... it disappears. Inspecting the element, I see it remains in model, but the DOM element loses its inner html (becomes empty div) - causing the div to "appear" to be hidden. import { Component } from '@angular/core'; import { DragulaService } from 'ng2-dragula/ng2-dragula'; @Component({ moduleId: module.id, selector: 'my-app', template: ` <div> <div class='wrapper'> <div class='container'

Angular 7: Uncaught ReferenceError: global is not defined when adding package

血红的双手。 提交于 2019-12-01 01:37:29
问题 I am building an Angular 7 app, and when i add a package npm install dragula --save and import this into the pollyfills.ts file i get this error: index.js:2 Uncaught ReferenceError: global is not defined at Object../node_modules/custom-event/index.js (index.js:2) at webpack_require (bootstrap:83) at Object../node_modules/crossvent/src/crossvent.js (crossvent.js:3) at webpack_require (bootstrap:83) at Object../node_modules/dragula/dragula.js (dragula.js:4) at webpack_require (bootstrap:83) at