@fieldnotes/core 0.20.0 → 0.22.0
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/README.md +9 -0
- package/dist/index.cjs +323 -139
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +323 -139
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -401,6 +401,15 @@ new Viewport(container, {
|
|
|
401
401
|
spacing: 24, // grid spacing in px (default: 24)
|
|
402
402
|
color: '#d0d0d0', // dot/line color (default: '#d0d0d0')
|
|
403
403
|
},
|
|
404
|
+
// Called for every drop; replaces the built-in image-drop handling
|
|
405
|
+
onDrop: (event, worldPosition) => {
|
|
406
|
+
/* handle drop */
|
|
407
|
+
},
|
|
408
|
+
// Called when an image element fails to load; failed images render a gray
|
|
409
|
+
// placeholder. Falls back to console.warn when unset.
|
|
410
|
+
onImageError: ({ src, elementIds }) => {
|
|
411
|
+
/* handle broken image */
|
|
412
|
+
},
|
|
404
413
|
});
|
|
405
414
|
```
|
|
406
415
|
|