aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/animationtimeline/Keyframe.tsx74
-rw-r--r--src/client/views/animationtimeline/Timeline.tsx56
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx4
3 files changed, 67 insertions, 67 deletions
diff --git a/src/client/views/animationtimeline/Keyframe.tsx b/src/client/views/animationtimeline/Keyframe.tsx
index fd4a3f281..bb557289e 100644
--- a/src/client/views/animationtimeline/Keyframe.tsx
+++ b/src/client/views/animationtimeline/Keyframe.tsx
@@ -36,7 +36,7 @@ export namespace KeyframeFunc {
let leftMost: (RegionData | undefined) = undefined;
let rightMost: (RegionData | undefined) = undefined;
DocListCast(regions).forEach(region => {
- let neighbor = RegionData(region);
+ const neighbor = RegionData(region);
if (currentRegion.position! > neighbor.position) {
if (!leftMost || neighbor.position > leftMost.position) {
leftMost = neighbor;
@@ -57,7 +57,7 @@ export namespace KeyframeFunc {
export const calcMinLeft = async (region: Doc, currentBarX: number, ref?: Doc) => { //returns the time of the closet keyframe to the left
let leftKf: (Doc | undefined) = undefined;
let time: number = 0;
- let keyframes = await DocListCastAsync(region.keyframes!);
+ const keyframes = await DocListCastAsync(region.keyframes!);
keyframes!.forEach((kf) => {
let compTime = currentBarX;
if (ref) compTime = NumCast(ref.time);
@@ -73,7 +73,7 @@ export namespace KeyframeFunc {
export const calcMinRight = async (region: Doc, currentBarX: number, ref?: Doc) => { //returns the time of the closest keyframe to the right
let rightKf: (Doc | undefined) = undefined;
let time: number = Infinity;
- let keyframes = await DocListCastAsync(region.keyframes!);
+ const keyframes = await DocListCastAsync(region.keyframes!);
keyframes!.forEach((kf) => {
let compTime = currentBarX;
if (ref) compTime = NumCast(ref.time);
@@ -86,7 +86,7 @@ export namespace KeyframeFunc {
};
export const defaultKeyframe = () => {
- let regiondata = new Doc(); //creating regiondata in MILI
+ const regiondata = new Doc(); //creating regiondata in MILI
regiondata.duration = 4000;
regiondata.position = 0;
regiondata.fadeIn = 1000;
@@ -98,7 +98,7 @@ export namespace KeyframeFunc {
export const convertPixelTime = (pos: number, unit: "mili" | "sec" | "min" | "hr", dir: "pixel" | "time", tickSpacing: number, tickIncrement: number) => {
- let time = dir === "pixel" ? (pos * tickSpacing) / tickIncrement : (pos / tickSpacing) * tickIncrement;
+ const time = dir === "pixel" ? (pos * tickSpacing) / tickIncrement : (pos / tickSpacing) * tickIncrement;
switch (unit) {
case "mili":
return time;
@@ -180,10 +180,10 @@ export class Keyframe extends React.Component<IProps> {
componentDidMount() {
setTimeout(() => { //giving it a temporary 1sec delay...
if (!this.regiondata.keyframes) this.regiondata.keyframes = new List<Doc>();
- let start = this.props.makeKeyData(this.regiondata, this.regiondata.position, KeyframeFunc.KeyframeType.end);
- let fadeIn = this.props.makeKeyData(this.regiondata, this.regiondata.position + this.regiondata.fadeIn, KeyframeFunc.KeyframeType.fade);
- let fadeOut = this.props.makeKeyData(this.regiondata, this.regiondata.position + this.regiondata.duration - this.regiondata.fadeOut, KeyframeFunc.KeyframeType.fade);
- let finish = this.props.makeKeyData(this.regiondata, this.regiondata.position + this.regiondata.duration,KeyframeFunc.KeyframeType.end);
+ const start = this.props.makeKeyData(this.regiondata, this.regiondata.position, KeyframeFunc.KeyframeType.end);
+ const fadeIn = this.props.makeKeyData(this.regiondata, this.regiondata.position + this.regiondata.fadeIn, KeyframeFunc.KeyframeType.fade);
+ const fadeOut = this.props.makeKeyData(this.regiondata, this.regiondata.position + this.regiondata.duration - this.regiondata.fadeOut, KeyframeFunc.KeyframeType.fade);
+ const finish = this.props.makeKeyData(this.regiondata, this.regiondata.position + this.regiondata.duration,KeyframeFunc.KeyframeType.end);
(fadeIn.key as Doc).opacity = 1;
(fadeOut.key as Doc).opacity = 1;
(start.key as Doc).opacity = 0.1;
@@ -199,7 +199,7 @@ export class Keyframe extends React.Component<IProps> {
onBarPointerDown = (e: React.PointerEvent) => {
e.preventDefault();
e.stopPropagation();
- let clientX = e.clientX;
+ const clientX = e.clientX;
if (this._doubleClickEnabled) {
this.createKeyframe(clientX);
this._doubleClickEnabled = false;
@@ -224,10 +224,10 @@ export class Keyframe extends React.Component<IProps> {
if (e.movementX !== 0) {
this._mouseToggled = true;
}
- let left = KeyframeFunc.findAdjacentRegion(KeyframeFunc.Direction.left, this.regiondata, this.regions)!;
- let right = KeyframeFunc.findAdjacentRegion(KeyframeFunc.Direction.right, this.regiondata, this.regions!);
- let prevX = this.regiondata.position;
- let futureX = this.regiondata.position + KeyframeFunc.convertPixelTime(e.movementX, "mili", "time", this.props.tickSpacing, this.props.tickIncrement);
+ const left = KeyframeFunc.findAdjacentRegion(KeyframeFunc.Direction.left, this.regiondata, this.regions)!;
+ const right = KeyframeFunc.findAdjacentRegion(KeyframeFunc.Direction.right, this.regiondata, this.regions!);
+ const prevX = this.regiondata.position;
+ const futureX = this.regiondata.position + KeyframeFunc.convertPixelTime(e.movementX, "mili", "time", this.props.tickSpacing, this.props.tickIncrement);
if (futureX <= 0) {
this.regiondata.position = 0;
} else if ((left && left.position + left.duration >= futureX)) {
@@ -237,7 +237,7 @@ export class Keyframe extends React.Component<IProps> {
} else {
this.regiondata.position = futureX;
}
- let movement = this.regiondata.position - prevX;
+ const movement = this.regiondata.position - prevX;
this.keyframes.forEach(kf => {
kf.time = NumCast(kf.time) + movement;
});
@@ -267,9 +267,9 @@ export class Keyframe extends React.Component<IProps> {
onDragResizeLeft = (e: PointerEvent) => {
e.preventDefault();
e.stopPropagation();
- let bar = this._bar.current!;
- let offset = KeyframeFunc.convertPixelTime(Math.round((e.clientX - bar.getBoundingClientRect().left) * this.props.transform.Scale), "mili", "time", this.props.tickSpacing, this.props.tickIncrement);
- let leftRegion = KeyframeFunc.findAdjacentRegion(KeyframeFunc.Direction.left, this.regiondata, this.regions);
+ const bar = this._bar.current!;
+ const offset = KeyframeFunc.convertPixelTime(Math.round((e.clientX - bar.getBoundingClientRect().left) * this.props.transform.Scale), "mili", "time", this.props.tickSpacing, this.props.tickIncrement);
+ const leftRegion = KeyframeFunc.findAdjacentRegion(KeyframeFunc.Direction.left, this.regiondata, this.regions);
if (leftRegion && this.regiondata.position + offset <= leftRegion.position + leftRegion.duration) {
this.regiondata.position = leftRegion.position + leftRegion.duration;
this.regiondata.duration = NumCast(this.keyframes[this.keyframes.length - 1].time) - (leftRegion.position + leftRegion.duration);
@@ -292,10 +292,10 @@ export class Keyframe extends React.Component<IProps> {
onDragResizeRight = (e: PointerEvent) => {
e.preventDefault();
e.stopPropagation();
- let bar = this._bar.current!;
- let offset = KeyframeFunc.convertPixelTime(Math.round((e.clientX - bar.getBoundingClientRect().right) * this.props.transform.Scale), "mili", "time", this.props.tickSpacing, this.props.tickIncrement);
- let rightRegion = KeyframeFunc.findAdjacentRegion(KeyframeFunc.Direction.right, this.regiondata, this.regions);
- let fadeOutKeyframeTime = NumCast(this.keyframes[this.keyframes.length - 3].time);
+ const bar = this._bar.current!;
+ const offset = KeyframeFunc.convertPixelTime(Math.round((e.clientX - bar.getBoundingClientRect().right) * this.props.transform.Scale), "mili", "time", this.props.tickSpacing, this.props.tickIncrement);
+ const rightRegion = KeyframeFunc.findAdjacentRegion(KeyframeFunc.Direction.right, this.regiondata, this.regions);
+ const fadeOutKeyframeTime = NumCast(this.keyframes[this.keyframes.length - 3].time);
if (this.regiondata.position + this.regiondata.duration - this.regiondata.fadeOut + offset <= fadeOutKeyframeTime) { //case 1: when third to last keyframe is in the way
this.regiondata.duration = fadeOutKeyframeTime - this.regiondata.position + this.regiondata.fadeOut;
} else if (rightRegion && (this.regiondata.position + this.regiondata.duration + offset >= rightRegion.position)) {
@@ -311,10 +311,10 @@ export class Keyframe extends React.Component<IProps> {
@action
createKeyframe = async (clientX: number) => {
this._mouseToggled = true;
- let bar = this._bar.current!;
- let offset = KeyframeFunc.convertPixelTime(Math.round((clientX - bar.getBoundingClientRect().left) * this.props.transform.Scale), "mili", "time", this.props.tickSpacing, this.props.tickIncrement);
+ const bar = this._bar.current!;
+ const offset = KeyframeFunc.convertPixelTime(Math.round((clientX - bar.getBoundingClientRect().left) * this.props.transform.Scale), "mili", "time", this.props.tickSpacing, this.props.tickIncrement);
if (offset > this.regiondata.fadeIn && offset < this.regiondata.duration - this.regiondata.fadeOut) { //make sure keyframe is not created inbetween fades and ends
- let position = this.regiondata.position;
+ const position = this.regiondata.position;
this.props.makeKeyData(this.regiondata, Math.round(position + offset), KeyframeFunc.KeyframeType.default);
this.regiondata.hasData = true;
this.props.changeCurrentBarX(KeyframeFunc.convertPixelTime(Math.round(position + offset), "mili", "pixel", this.props.tickSpacing, this.props.tickIncrement)); //first move the keyframe to the correct location and make a copy so the correct file gets coppied
@@ -337,7 +337,7 @@ export class Keyframe extends React.Component<IProps> {
makeKeyframeMenu = (kf: Doc, e: MouseEvent) => {
TimelineMenu.Instance.addItem("button", "Show Data", () => {
runInAction(() => {
- let kvp = Docs.Create.KVPDocument(Cast(kf.key, Doc) as Doc, { _width: 300, _height: 300 });
+ const kvp = Docs.Create.KVPDocument(Cast(kf.key, Doc) as Doc, { _width: 300, _height: 300 });
CollectionDockingView.AddRightSplit(kvp, (kf.key as Doc).data as Doc);
});
}),
@@ -350,7 +350,7 @@ export class Keyframe extends React.Component<IProps> {
TimelineMenu.Instance.addItem("input", "Move", (val) => {
runInAction(() => {
let cannotMove: boolean = false;
- let kfIndex: number = this.keyframes.indexOf(kf);
+ const kfIndex: number = this.keyframes.indexOf(kf);
if (val < 0 || (val < NumCast(this.keyframes[kfIndex - 1].time) || val > NumCast(this.keyframes[kfIndex + 1].time))) {
cannotMove = true;
}
@@ -401,7 +401,7 @@ export class Keyframe extends React.Component<IProps> {
}),
TimelineMenu.Instance.addItem("input", `position: ${this.regiondata.position}ms`, (val) => {
runInAction(() => {
- let prevPosition = this.regiondata.position;
+ const prevPosition = this.regiondata.position;
let cannotMove: boolean = false;
DocListCast(this.regions).forEach(region => {
if (NumCast(region.position) !== this.regiondata.position) {
@@ -454,7 +454,7 @@ export class Keyframe extends React.Component<IProps> {
onContainerOver = (e: React.PointerEvent, ref: React.RefObject<HTMLDivElement>) => {
e.preventDefault();
e.stopPropagation();
- let div = ref.current!;
+ const div = ref.current!;
div.style.opacity = "1";
Doc.BrushDoc(this.props.node);
}
@@ -466,7 +466,7 @@ export class Keyframe extends React.Component<IProps> {
onContainerOut = (e: React.PointerEvent, ref: React.RefObject<HTMLDivElement>) => {
e.preventDefault();
e.stopPropagation();
- let div = ref.current!;
+ const div = ref.current!;
div.style.opacity = "0";
Doc.UnBrushDoc(this.props.node);
}
@@ -481,7 +481,7 @@ export class Keyframe extends React.Component<IProps> {
*/
@action
drawKeyframes = () => {
- let keyframeDivs: JSX.Element[] = [];
+ const keyframeDivs: JSX.Element[] = [];
DocListCast(this.regiondata.keyframes).forEach(kf => {
if (kf.type as KeyframeFunc.KeyframeType !== KeyframeFunc.KeyframeType.end) {
keyframeDivs.push(
@@ -514,14 +514,14 @@ export class Keyframe extends React.Component<IProps> {
*/
@action
drawKeyframeDividers = () => {
- let keyframeDividers: JSX.Element[] = [];
+ const keyframeDividers: JSX.Element[] = [];
DocListCast(this.regiondata.keyframes).forEach(kf => {
- let index = this.keyframes.indexOf(kf);
+ const index = this.keyframes.indexOf(kf);
if (index !== this.keyframes.length - 1) {
- let right = this.keyframes[index + 1];
- let bodyRef = React.createRef<HTMLDivElement>();
- let kfPos = KeyframeFunc.convertPixelTime(NumCast(kf.time), "mili", "pixel", this.props.tickSpacing, this.props.tickIncrement);
- let rightPos = KeyframeFunc.convertPixelTime(NumCast(right.time), "mili", "pixel", this.props.tickSpacing, this.props.tickIncrement);
+ const right = this.keyframes[index + 1];
+ const bodyRef = React.createRef<HTMLDivElement>();
+ const kfPos = KeyframeFunc.convertPixelTime(NumCast(kf.time), "mili", "pixel", this.props.tickSpacing, this.props.tickIncrement);
+ const rightPos = KeyframeFunc.convertPixelTime(NumCast(right.time), "mili", "pixel", this.props.tickSpacing, this.props.tickIncrement);
keyframeDividers.push(
<div ref={bodyRef} className="body-container" style={{ left: `${kfPos - this.pixelPosition}px`, width: `${rightPos - kfPos}px` }}
onPointerOver={(e) => { e.preventDefault(); e.stopPropagation(); this.onContainerOver(e, bodyRef); }}
diff --git a/src/client/views/animationtimeline/Timeline.tsx b/src/client/views/animationtimeline/Timeline.tsx
index 2ac7e6c92..dc381609e 100644
--- a/src/client/views/animationtimeline/Timeline.tsx
+++ b/src/client/views/animationtimeline/Timeline.tsx
@@ -86,7 +86,7 @@ export class Timeline extends React.Component<FieldViewProps> {
*/
@computed
private get children(): List<Doc> {
- let extendedDocument = ["image", "video", "pdf"].includes(StrCast(this.props.Document.type));
+ const extendedDocument = ["image", "video", "pdf"].includes(StrCast(this.props.Document.type));
if (extendedDocument) {
if (this.props.Document.data_ext) {
return Cast((Cast(this.props.Document.data_ext, Doc) as Doc).annotations, listSpec(Doc)) as List<Doc>;
@@ -99,7 +99,7 @@ export class Timeline extends React.Component<FieldViewProps> {
/////////lifecycle functions////////////
componentWillMount() {
- let relativeHeight = window.innerHeight / 20; //sets height to arbitrary size, relative to innerHeight
+ const relativeHeight = window.innerHeight / 20; //sets height to arbitrary size, relative to innerHeight
this._titleHeight = relativeHeight < this.MAX_TITLE_HEIGHT ? relativeHeight : this.MAX_TITLE_HEIGHT; //check if relHeight is less than Maxheight. Else, just set relheight to max
this.MIN_CONTAINER_HEIGHT = this._titleHeight + 130; //offset
this.DEFAULT_CONTAINER_HEIGHT = this._titleHeight * 2 + 130; //twice the titleheight + offset
@@ -133,7 +133,7 @@ export class Timeline extends React.Component<FieldViewProps> {
*/
@action
drawTicks = () => {
- let ticks = [];
+ const ticks = [];
for (let i = 0; i < this._time / this._tickIncrement; i++) {
ticks.push(<div key={Utils.GenerateGuid()} className="tick" style={{ transform: `translate(${i * this._tickSpacing}px)`, position: "absolute", pointerEvents: "none" }}> <p className="number-label">{this.toReadTime(i * this._tickIncrement)}</p></div>);
}
@@ -226,9 +226,9 @@ export class Timeline extends React.Component<FieldViewProps> {
onScrubberMove = (e: PointerEvent) => {
e.preventDefault();
e.stopPropagation();
- let scrubberbox = this._infoContainer.current!;
- let left = scrubberbox.getBoundingClientRect().left;
- let offsetX = Math.round(e.clientX - left) * this.props.ScreenToLocalTransform().Scale;
+ const scrubberbox = this._infoContainer.current!;
+ const left = scrubberbox.getBoundingClientRect().left;
+ const offsetX = Math.round(e.clientX - left) * this.props.ScreenToLocalTransform().Scale;
this.changeCurrentBarX(offsetX + this._visibleStart); //changes scrubber to clicked scrubber position
}
@@ -239,7 +239,7 @@ export class Timeline extends React.Component<FieldViewProps> {
onPanDown = (e: React.PointerEvent) => {
e.preventDefault();
e.stopPropagation();
- let clientX = e.clientX;
+ const clientX = e.clientX;
if (this._doubleClickEnabled) {
this._doubleClickEnabled = false;
} else {
@@ -270,8 +270,8 @@ export class Timeline extends React.Component<FieldViewProps> {
if (e.movementX !== 0 || e.movementY !== 0) {
this._mouseToggled = true;
}
- let trackbox = this._trackbox.current!;
- let titleContainer = this._titleContainer.current!;
+ const trackbox = this._trackbox.current!;
+ const titleContainer = this._titleContainer.current!;
this.movePanX(this._visibleStart - e.movementX);
trackbox.scrollTop = trackbox.scrollTop - e.movementY;
titleContainer.scrollTop = titleContainer.scrollTop - e.movementY;
@@ -287,7 +287,7 @@ export class Timeline extends React.Component<FieldViewProps> {
@action
movePanX = (pixel: number) => {
- let infoContainer = this._infoContainer.current!;
+ const infoContainer = this._infoContainer.current!;
infoContainer.scrollLeft = pixel;
this._visibleStart = infoContainer.scrollLeft;
}
@@ -309,7 +309,7 @@ export class Timeline extends React.Component<FieldViewProps> {
onResizeMove = (e: PointerEvent) => {
e.preventDefault();
e.stopPropagation();
- let offset = e.clientY - this._timelineContainer.current!.getBoundingClientRect().bottom;
+ const offset = e.clientY - this._timelineContainer.current!.getBoundingClientRect().bottom;
// let offset = 0;
if (this._containerHeight + offset <= this.MIN_CONTAINER_HEIGHT) {
this._containerHeight = this.MIN_CONTAINER_HEIGHT;
@@ -326,10 +326,10 @@ export class Timeline extends React.Component<FieldViewProps> {
@action
toReadTime = (time: number): string => {
time = time / 1000;
- var inSeconds = Math.round((time * 100)) / 100;
+ const inSeconds = Math.round((time * 100)) / 100;
// var inSeconds = parseFloat(time.toFixed(2));
// const inSeconds = (Math.floor(time) / 1000);
- let min: (string | number) = Math.floor(inSeconds / 60);
+ const min: (string | number) = Math.floor(inSeconds / 60);
let sec: (string | number) = inSeconds % 60;
if (Math.floor(sec / 10) === 0) {
@@ -360,12 +360,12 @@ export class Timeline extends React.Component<FieldViewProps> {
onWheelZoom = (e: React.WheelEvent) => {
e.preventDefault();
e.stopPropagation();
- let offset = e.clientX - this._infoContainer.current!.getBoundingClientRect().left;
- let prevTime = KeyframeFunc.convertPixelTime(this._visibleStart + offset, "mili", "time", this._tickSpacing, this._tickIncrement);
- let prevCurrent = KeyframeFunc.convertPixelTime(this._currentBarX, "mili", "time", this._tickSpacing, this._tickIncrement);
+ const offset = e.clientX - this._infoContainer.current!.getBoundingClientRect().left;
+ const prevTime = KeyframeFunc.convertPixelTime(this._visibleStart + offset, "mili", "time", this._tickSpacing, this._tickIncrement);
+ const prevCurrent = KeyframeFunc.convertPixelTime(this._currentBarX, "mili", "time", this._tickSpacing, this._tickIncrement);
e.deltaY < 0 ? this.zoom(true) : this.zoom(false);
- let currPixel = KeyframeFunc.convertPixelTime(prevTime, "mili", "pixel", this._tickSpacing, this._tickIncrement);
- let currCurrent = KeyframeFunc.convertPixelTime(prevCurrent, "mili", "pixel", this._tickSpacing, this._tickIncrement);
+ const currPixel = KeyframeFunc.convertPixelTime(prevTime, "mili", "pixel", this._tickSpacing, this._tickIncrement);
+ const currCurrent = KeyframeFunc.convertPixelTime(prevCurrent, "mili", "pixel", this._tickSpacing, this._tickIncrement);
this._infoContainer.current!.scrollLeft = currPixel - offset;
this._visibleStart = currPixel - offset > 0 ? currPixel - offset : 0;
this._visibleStart += this._visibleLength + this._visibleStart > this._totalLength ? this._totalLength - (this._visibleStart + this._visibleLength) : 0;
@@ -396,7 +396,7 @@ export class Timeline extends React.Component<FieldViewProps> {
spacingChange -= 5;
}
}
- let finalLength = spacingChange * (this._time / incrementChange);
+ const finalLength = spacingChange * (this._time / incrementChange);
if (finalLength >= this._infoContainer.current!.getBoundingClientRect().width) {
this._totalLength = finalLength;
this._tickSpacing = spacingChange;
@@ -408,19 +408,19 @@ export class Timeline extends React.Component<FieldViewProps> {
* tool box includes the toggle buttons at the top of the timeline (both editing mode and play mode)
*/
private timelineToolBox = (scale: number) => {
- let size = 40 * scale; //50 is default
- let iconSize = 25;
+ const size = 40 * scale; //50 is default
+ const iconSize = 25;
//decides if information should be omitted because the timeline is very small
// if its less than 950 pixels then it's going to be overlapping
let shouldCompress = false;
- let width: number = this.props.PanelWidth();
+ const width: number = this.props.PanelWidth();
if (width < 850) {
shouldCompress = true;
}
let modeString, overviewString, lengthString;
- let modeType = this.props.Document.isATOn ? "Author" : "Play";
+ const modeType = this.props.Document.isATOn ? "Author" : "Play";
if (!shouldCompress) {
modeString = "Mode: " + modeType;
@@ -489,9 +489,9 @@ export class Timeline extends React.Component<FieldViewProps> {
* turns on the toggle button (the purple slide button that changes from editing mode and play mode
*/
private toggleHandle = () => {
- let roundToggle = this._roundToggleRef.current!;
- let roundToggleContainer = this._roundToggleContainerRef.current!;
- let timelineContainer = this._timelineContainer.current!;
+ const roundToggle = this._roundToggleRef.current!;
+ const roundToggleContainer = this._roundToggleContainerRef.current!;
+ const timelineContainer = this._timelineContainer.current!;
if (BoolCast(this.props.Document.isATOn)) {
roundToggle.style.transform = "translate(0px, 0px)";
roundToggle.style.animationName = "turnoff";
@@ -522,9 +522,9 @@ export class Timeline extends React.Component<FieldViewProps> {
// @computed
getCurrentTime = () => {
- let current = KeyframeFunc.convertPixelTime(this._currentBarX, "mili", "time", this._tickSpacing, this._tickIncrement);
+ const current = KeyframeFunc.convertPixelTime(this._currentBarX, "mili", "time", this._tickSpacing, this._tickIncrement);
// console.log(this._currentBarX)
- return this.toReadTime(current); ``
+ return this.toReadTime(current);
// return (Math.floor(current) / 1000)
// return current / 1000.0;
}
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 56b3b3bc0..ef1ec5e78 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -809,7 +809,7 @@ export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) {
doFreeformLayout(poolData: Map<string, any>) {
const layoutDocs = this.childLayoutPairs.map(pair => pair.layout);
const initResult = this.Document.arrangeInit && this.Document.arrangeInit.script.run({ docs: layoutDocs, collection: this.Document }, console.log);
- let state = initResult && initResult.success ? initResult.result.scriptState : undefined;
+ const state = initResult && initResult.success ? initResult.result.scriptState : undefined;
const elements = initResult && initResult.success ? this.viewDefsToJSX(initResult.result.views) : [];
this.childLayoutPairs.filter(pair => this.isCurrent(pair.layout)).map((pair, i) => {
@@ -1001,7 +1001,7 @@ export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) {
}
});
//@ts-ignore
- let subitems: ContextMenuProps[] =
+ const subitems: ContextMenuProps[] =
DocListCast((CurrentUserUtils.UserDocument.noteTypes as Doc).data).map((note, i) => ({
description: (i + 1) + ": " + StrCast(note.title),
event: () => console.log("Hi"),