aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PropertiesButtons.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/PropertiesButtons.tsx')
-rw-r--r--src/client/views/PropertiesButtons.tsx22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx
index 862c37890..14dce66f0 100644
--- a/src/client/views/PropertiesButtons.tsx
+++ b/src/client/views/PropertiesButtons.tsx
@@ -3,25 +3,23 @@ import { Tooltip } from '@material-ui/core';
import { action, computed, observable } from "mobx";
import { observer } from "mobx-react";
import { Doc, Opt } from "../../fields/Doc";
+import { Id } from "../../fields/FieldSymbols";
import { InkField } from '../../fields/InkField';
import { RichTextField } from '../../fields/RichTextField';
import { BoolCast, StrCast } from "../../fields/Types";
+import { ImageField } from "../../fields/URLField";
import { DocUtils } from '../documents/Documents';
import { DocumentType } from '../documents/DocumentTypes';
import { SelectionManager } from '../util/SelectionManager';
import { undoBatch } from '../util/UndoManager';
import { CollectionViewType } from './collections/CollectionView';
+import { Colors } from "./global/globalEnums";
import { InkingStroke } from './InkingStroke';
import { DocumentView } from './nodes/DocumentView';
+import { VideoBox } from "./nodes/VideoBox";
+import { pasteImageBitmap } from "./nodes/WebBoxRenderer";
import './PropertiesButtons.scss';
import React = require("react");
-import { Colors } from "./global/globalEnums";
-import { CollectionFreeFormView } from "./collections/collectionFreeForm";
-import { DocumentManager } from "../util/DocumentManager";
-import { pasteImageBitmap } from "./nodes/WebBoxRenderer";
-import { VideoBox } from "./nodes/VideoBox";
-import { Id } from "../../fields/FieldSymbols";
-import { ImageField } from "../../fields/URLField";
const higflyout = require("@hig/flyout");
export const { anchorPoints } = higflyout;
export const Flyout = higflyout.default;
@@ -73,7 +71,7 @@ export class PropertiesButtons extends React.Component<{}, {}> {
return this.propertyToggleBtn("Lock\xA0View", "_lockedTransform", on => `${on ? "Unlock" : "Lock"} panning of view`, on => "lock");
}
@computed get fitContentButton() {
- return this.propertyToggleBtn("View All", "_fitToBox", on => `${on ? "Don't" : "Do"} fit content to container visible area`, on => "eye");
+ return this.propertyToggleBtn("View All", "_fitContentsToBox", on => `${on ? "Don't" : "Do"} fit content to container visible area`, on => "eye");
}
@computed get fitWidthButton() {
return this.propertyToggleBtn("Fit\xA0Width", "_fitWidth", on => `${on ? "Don't" : "Do"} fit content to width of container`, on => "arrows-alt-h");
@@ -102,9 +100,9 @@ export class PropertiesButtons extends React.Component<{}, {}> {
else {
document.body.focus(); // so that we can access the clipboard without an error
setTimeout(() =>
- pasteImageBitmap((data: any, error: any) => {
+ pasteImageBitmap((data_url: any, error: any) => {
error && console.log(error);
- data && VideoBox.convertDataUri(data, doc[Id] + "-thumb-frozen", true).then(
+ data_url && VideoBox.convertDataUri(data_url, doc[Id] + "-thumb-frozen", true).then(
returnedfilename => doc["thumb-frozen"] = new ImageField(returnedfilename));
}));
}
@@ -202,7 +200,7 @@ export class PropertiesButtons extends React.Component<{}, {}> {
{list}
</div>
</div>
- {Doc.UserDoc().noviceMode ? (null) : <div onPointerDown={this.editOnClickScript} className="onClickFlyout-editScript"> Edit onClick Script</div>}
+ {Doc.noviceMode ? (null) : <div onPointerDown={this.editOnClickScript} className="onClickFlyout-editScript"> Edit onClick Script</div>}
</div>;
}
@computed
@@ -232,7 +230,7 @@ export class PropertiesButtons extends React.Component<{}, {}> {
const isTree = this.selectedDoc?._viewType === CollectionViewType.Tree;
const isTabView = this.selectedTabView;
const toggle = (ele: JSX.Element | null, style?: React.CSSProperties) => <div className="propertiesButtons-button" style={style}> {ele} </div>;
- const isNovice = Doc.UserDoc().noviceMode;
+ const isNovice = Doc.noviceMode;
return !this.selectedDoc ? (null) :
<div className="propertiesButtons">
{toggle(this.titleButton)}