diff --git a/src/components/ImageCard.tsx b/src/components/ImageCard.tsx
index 1f750ff..3601c73 100644
--- a/src/components/ImageCard.tsx
+++ b/src/components/ImageCard.tsx
@@ -88,6 +88,12 @@ export function ImageCard({ key: itemKey, data: item }: ImageCard.ImageCardProps
window.removeEventListener('mouseup', _handleResizeMouseUp)
}
+ function _handleClose(_e: Event) {
+ ImagesSignal.default.removeImage(item.id)
+ ImagesSignal.default.images.notify()
+ debounceLSUpdate()
+ }
+
return (
-
+
diff --git a/src/components/TextItem.tsx b/src/components/TextItem.tsx
index 8a61688..a12bc49 100644
--- a/src/components/TextItem.tsx
+++ b/src/components/TextItem.tsx
@@ -47,8 +47,9 @@ export function TextItem({ key: itemKey, data: item }: TextItem.TextCardProps) {
}
function _handleMouseDown(e: MouseEvent) {
- e.preventDefault()
focusedItem.value = itemKey
+ e.preventDefault()
+ e.stopPropagation()
offsetX.current = e.offsetX
offsetY.current = e.offsetY
pressed.value = true
@@ -69,23 +70,24 @@ export function TextItem({ key: itemKey, data: item }: TextItem.TextCardProps) {
function _handleResizeMouseDown(e: MouseEvent) {
+ e.stopPropagation()
initialResizeX.current = e.pageX
pressed.value = true
window.addEventListener('mousemove', _handleResizeMove)
window.addEventListener('mouseup', _handleResizeMouseUp)
}
- function _handleResizeMouseUp() {
+ function _handleResizeMouseUp(_e: MouseEvent) {
pressed.value = false
- updateLocalStorage()
window.removeEventListener('mousemove', _handleResizeMove)
window.removeEventListener('mouseup', _handleResizeMouseUp)
+ updateLocalStorage()
}
return (
-
+
{item.contents}
-
+
+
+
)
}
+function ExpandIcon({ cb, item }: {
+ cb: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null | undefined,
+ item: TextSignal.TextCardType
+}) {
+
+ return (
+
+ )
+}