Skip to content

Commit

Permalink
Removing existing placeholders before creating a new one
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Nalepa committed Dec 12, 2016
1 parent 0f3f426 commit bd4b045
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dragsterjs",
"version": "1.3.5",
"version": "1.3.6",
"homepage": "https://github.com/sunpietro/dragster",
"authors": [
"Piotr Nalepa <[email protected]>"
Expand Down
9 changes: 6 additions & 3 deletions dragster.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*@preserve
* Dragster - drag'n'drop library v1.3.5
* Dragster - drag'n'drop library v1.3.6
* https://github.com/sunpietro/dragster
*
* Copyright 2015-2016 Piotr Nalepa
Expand All @@ -8,7 +8,7 @@
* Released under the MIT license
* https://github.com/sunpietro/dragster/blob/master/LICENSE
*
* Date: 2016-12-12T07:00Z
* Date: 2016-12-12T19:00Z
*/
(function (window, document) {
'use strict';
Expand Down Expand Up @@ -145,7 +145,7 @@
*/
clonedTo: NULL,
},
dragsterEventInfo,
dragsterEventInfo = {},
key,
regions,
getElement,
Expand Down Expand Up @@ -574,10 +574,13 @@
dragsterEventInfo.shadow.left = left;

if (dropTarget && dropTarget !== draggedElement && !isInDragOnlyRegion) {
moveActions.removePlaceholders();
moveActions.addPlaceholderOnTarget(dropTarget, elementPositionY, pageYOffset);
} else if (isTargetRegion && !isTargetRegionDragOnly && !hasTargetDraggaBleElements && !hasTargetPlaceholders) {
moveActions.removePlaceholders();
moveActions.addPlaceholderInRegion(unknownTarget);
} else if (isTargetRegion && !isTargetRegionDragOnly && hasTargetDraggaBleElements && !hasTargetPlaceholders) {
moveActions.removePlaceholders();
moveActions.addPlaceholderInRegionBelowTargets(unknownTarget);
} else if (!isTargetRegion && !isTargetPlaceholder) {
moveActions.removePlaceholders();
Expand Down
6 changes: 3 additions & 3 deletions dragster.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified dragster.min.js.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions dragster.style.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Dragster - drag'n'drop library v1.3.5
* Dragster - drag'n'drop library v1.3.6
* https://github.com/sunpietro/dragster
*
* Copyright 2015-2016 Piotr Nalepa
Expand All @@ -8,7 +8,7 @@
* Released under the MIT license
* https://github.com/sunpietro/dragster/blob/master/LICENSE
*
* Date: 2016-12-12T07:00Z
* Date: 2016-12-12T19:00Z
*/
* {
box-sizing: border-box;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dragsterjs",
"version": "1.3.5",
"version": "1.3.6",
"description": "Tiny vanilla JS plugin that enables drag'n'drop interactions to a user of your website",
"main": "dragster.js",
"scripts": {
Expand Down

0 comments on commit bd4b045

Please sign in to comment.