Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a30654d

Browse files
authored
Merge pull request gridstack#2211 from adumesny/master
formatting
2 parents 5750ca9 + 51e428c commit a30654d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/dd-draggable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export class DDDraggable extends DDBaseImplement implements HTMLElementExtendOpt
158158
e.preventDefault();
159159
// preventDefault() prevents blur event which occurs just after mousedown event.
160160
// if an editable content has focus, then blur must be call
161-
if(document.activeElement) (document.activeElement as HTMLElement).blur();
161+
if (document.activeElement) (document.activeElement as HTMLElement).blur();
162162

163163
DDManager.mouseHandled = true;
164164
return true;

src/dd-touch.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ function simulatePointerMouseEvent(e: PointerEvent, simulatedType: string) {
118118
*/
119119
export function touchstart(e: TouchEvent): void {
120120
// Ignore the event if another widget is already being handled
121-
if (DDTouch.touchHandled) return; DDTouch.touchHandled = true;
121+
if (DDTouch.touchHandled) return;
122+
DDTouch.touchHandled = true;
122123

123124
// Simulate the mouse events
124125
// simulateMouseEvent(e, 'mouseover');
@@ -132,7 +133,7 @@ export function touchstart(e: TouchEvent): void {
132133
*/
133134
export function touchmove(e: TouchEvent): void {
134135
// Ignore event if not handled by us
135-
if (!DDTouch.touchHandled) return;
136+
if (!DDTouch.touchHandled) return;
136137

137138
simulateMouseEvent(e, 'mousemove');
138139
}
@@ -173,6 +174,7 @@ export function touchend(e: TouchEvent): void {
173174
* so instead of PointerEvent to still get enter/leave and send the matching mouse event.
174175
*/
175176
export function pointerdown(e: PointerEvent): void {
177+
// console.log("pointer down")
176178
(e.target as HTMLElement).releasePointerCapture(e.pointerId) // <- Important!
177179
}
178180

0 commit comments

Comments
 (0)