react-x11 2.8.2 → 2.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/cocoa/dnd.js +14 -0
package/package.json
CHANGED
package/src/cocoa/dnd.js
CHANGED
|
@@ -208,6 +208,19 @@ const wire = (value) =>
|
|
|
208
208
|
* first item under its UTI, thunks as promises the bridge asks `provide`
|
|
209
209
|
* to keep. The files thunk alone resolves now, because the items cannot
|
|
210
210
|
* be counted without it.
|
|
211
|
+
*
|
|
212
|
+
* No image, and so no slide-back. The picture of the drag is the app's own
|
|
213
|
+
* `<popup dragPreview>`; what the system session carries is a blank 1×1.
|
|
214
|
+
* Left at AppKit's default, a refused or cancelled drop plays
|
|
215
|
+
* `animatesToStartingPositionsOnCancelOrFail`'s slide home **before**
|
|
216
|
+
* `draggingSession:endedAtPoint:operation:` — the callback that is
|
|
217
|
+
* `drag-session-ended`, which `onDragEnd` and the preview's unmount wait
|
|
218
|
+
* on — so the button was up for about a second with the gesture still
|
|
219
|
+
* open and the preview frozen where the pointer let go, while AppKit
|
|
220
|
+
* animated nothing back to the press (#494). Off, the release ends the
|
|
221
|
+
* gesture the moment it happens, as on X11, and the return is the app's
|
|
222
|
+
* to animate from `onDragEnd`. Not a seam: there is no system image for
|
|
223
|
+
* a caller to want slid back.
|
|
211
224
|
*/
|
|
212
225
|
export function dragSpec(session, native, scale) {
|
|
213
226
|
const types = session.types;
|
|
@@ -241,6 +254,7 @@ export function dragSpec(session, native, scale) {
|
|
|
241
254
|
y: session.press.y / scale,
|
|
242
255
|
items,
|
|
243
256
|
operations: session.actions,
|
|
257
|
+
slideBack: false,
|
|
244
258
|
provide: (uti) => wire(session._resolve(reverse.get(uti) ?? uti)),
|
|
245
259
|
};
|
|
246
260
|
}
|