aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ImageBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/ImageBox.tsx')
-rw-r--r--src/client/views/nodes/ImageBox.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx
index 881c4553a..33411f978 100644
--- a/src/client/views/nodes/ImageBox.tsx
+++ b/src/client/views/nodes/ImageBox.tsx
@@ -42,7 +42,7 @@ export class ImageBox extends DocComponent<FieldViewProps, ImageDocument>(ImageD
onLoad = (target: any) => {
var h = this._imgRef.current!.naturalHeight;
var w = this._imgRef.current!.naturalWidth;
- if (this._photoIndex === 0) {
+ if (this._photoIndex === 0 && (this.props as any).id !== "isExpander") {
Doc.SetOnPrototype(this.Document, "nativeHeight", FieldValue(this.Document.nativeWidth, 0) * h / w);
this.Document.height = FieldValue(this.Document.width, 0) * h / w;
}
@@ -165,7 +165,9 @@ export class ImageBox extends DocComponent<FieldViewProps, ImageDocument>(ImageD
let interactive = InkingControl.Instance.selectedTool ? "" : "-interactive";
let id = (this.props as any).id; // bcz: used to set id = "isExpander" in templates.tsx
return (
- <div id={id} className={`imageBox-cont${interactive}`} onPointerDown={this.onPointerDown} onDrop={this.onDrop} ref={this.createDropTarget} onContextMenu={this.specificContextMenu}>
+ <div id={id} className={`imageBox-cont${interactive}`}
+ // onPointerDown={this.onPointerDown}
+ onDrop={this.onDrop} ref={this.createDropTarget} onContextMenu={this.specificContextMenu}>
<img id={id} src={paths[Math.min(paths.length, this._photoIndex)]}
style={{ objectFit: (this._photoIndex === 0 ? undefined : "contain") }}
width={nativeWidth}