aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/views/CollectionLinearView.tsx3
-rw-r--r--src/client/views/nodes/ImageBox.tsx4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/CollectionLinearView.tsx b/src/client/views/CollectionLinearView.tsx
index 31a518a6c..7c6d33d36 100644
--- a/src/client/views/CollectionLinearView.tsx
+++ b/src/client/views/CollectionLinearView.tsx
@@ -12,6 +12,7 @@ import { CollectionViewType } from './collections/CollectionView';
import { CollectionSubView } from './collections/CollectionSubView';
import { DocumentView } from './nodes/DocumentView';
import { documentSchema } from '../../new_fields/documentSchemas';
+import { Id } from '../../new_fields/FieldSymbols';
type LinearDocument = makeInterface<[typeof documentSchema,]>;
@@ -67,7 +68,7 @@ export class CollectionLinearView extends CollectionSubView(LinearDocument) {
let scalingContent = nested ? 1 : this.dimension() / (this._spacing + nativeWidth);
let scalingBox = nested ? 1 : this.dimension() / nativeWidth;
let deltaSize = nativeWidth * scalingBox - nativeWidth * scalingContent;
- return <div className={`collectionLinearView-docBtn` + (pair.layout.onClick || pair.layout.onDragStart ? "-scalable" : "")} key={StrCast(pair.layout.title)} ref={dref}
+ return <div className={`collectionLinearView-docBtn` + (pair.layout.onClick || pair.layout.onDragStart ? "-scalable" : "")} key={pair.layout[Id]} ref={dref}
style={{
width: nested ? pair.layout[WidthSym]() : this.dimension(),
height: nested && pair.layout.isExpanded ? pair.layout[HeightSym]() : this.dimension(),
diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx
index 4c2f8e22d..188440292 100644
--- a/src/client/views/nodes/ImageBox.tsx
+++ b/src/client/views/nodes/ImageBox.tsx
@@ -26,6 +26,7 @@ import "./ImageBox.scss";
import React = require("react");
import { CollectionFreeFormView } from '../collections/collectionFreeForm/CollectionFreeFormView';
import { documentSchema } from '../../../new_fields/documentSchemas';
+import { Id } from '../../../new_fields/FieldSymbols';
var requestImageSize = require('../../util/request-image-size');
var path = require('path');
const { Howl } = require('howler');
@@ -299,8 +300,7 @@ export class ImageBox extends DocAnnotatableComponent<FieldViewProps, ImageDocum
!this.Document.ignoreAspect && this.resize(srcpath);
return (
- <div className={`imageBox-cont${interactive}`}
- ref={this.createDropTarget} onContextMenu={this.specificContextMenu}>
+ <div className={`imageBox-cont${interactive}`} key={this.props.Document[Id]} ref={this.createDropTarget} onContextMenu={this.specificContextMenu}>
<div id="cf">
<img
key={this._smallRetryCount + (this._mediumRetryCount << 4) + (this._largeRetryCount << 8)} // force cache to update on retrys