mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
Update JQueryUI - DraggableEventUIParams (#49605)
* Update index.d.ts The property `originalPosition` was missing in the `DraggableEventUIParams` type * Update index.d.ts * Add test * Update index.d.ts
This commit is contained in:
committed by
GitHub
parent
a2f8ea161f
commit
574cc23c69
3
types/jqueryui/index.d.ts
vendored
3
types/jqueryui/index.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
// Type definitions for jQueryUI 1.12
|
||||
// Project: http://jqueryui.com/
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov>, John Reilly <https://github.com/johnnyreilly>
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov>, John Reilly <https://github.com/johnnyreilly>, Dieter Oberkofler <https://github.com/doberkofler>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -444,6 +444,7 @@ declare namespace JQueryUI {
|
||||
interface DraggableEventUIParams {
|
||||
helper: JQuery;
|
||||
position: { top: number; left: number; };
|
||||
originalPosition: { top: number; left: number; };
|
||||
offset: { top: number; left: number; };
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,9 @@ function test_draggable() {
|
||||
$("#draggable").draggable({
|
||||
start: () => { },
|
||||
drag: () => { },
|
||||
stop: () => { }
|
||||
stop: (event, ui) => {
|
||||
var left = ui.originalPosition.left;
|
||||
}
|
||||
});
|
||||
$("#draggable").draggable({ handle: "p" });
|
||||
$("#draggable2").draggable({ cancel: "p.ui-widget-header" });
|
||||
|
||||
Reference in New Issue
Block a user