aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PropertiesButtons.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-05-14 12:06:31 -0400
committerbobzel <zzzman@gmail.com>2023-05-14 12:06:31 -0400
commitcfd353baf7356024dc88c61289755dd6699ae9fd (patch)
tree971b25f07ff19cde5b3f40dc440e6dfa02944e18 /src/client/views/PropertiesButtons.tsx
parent24f9e3ddefb1853cce3f3c51dfbe6183d88bce78 (diff)
parent42afc0250de658fc3e924864bfae5afb4edec335 (diff)
Merge branch 'master' into UI_Update_Eric_Ma
Diffstat (limited to 'src/client/views/PropertiesButtons.tsx')
-rw-r--r--src/client/views/PropertiesButtons.tsx36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx
index cf808f801..86230ca78 100644
--- a/src/client/views/PropertiesButtons.tsx
+++ b/src/client/views/PropertiesButtons.tsx
@@ -74,7 +74,7 @@ export class PropertiesButtons extends React.Component<{}, {}> {
@computed get maskButton() {
return this.propertyToggleBtn(
'Mask',
- 'isInkMask',
+ 'stroke_isInkMask',
on => (on ? 'Make plain ink' : 'Make highlight mask'),
on => 'paint-brush',
(dv, doc) => InkingStroke.toggleMask(dv?.layoutDoc || doc)
@@ -91,7 +91,7 @@ export class PropertiesButtons extends React.Component<{}, {}> {
@computed get clustersButton() {
return this.propertyToggleBtn(
'Clusters',
- '_useClusters',
+ '_freeform_useClusters',
on => `${on ? 'Hide' : 'Show'} clusters`,
on => 'braille'
);
@@ -115,7 +115,7 @@ export class PropertiesButtons extends React.Component<{}, {}> {
@computed get fitContentButton() {
return this.propertyToggleBtn(
'View All',
- '_fitContentsToBox',
+ '_freeform_fitContentsToBox',
on => `${on ? "Don't" : 'Do'} fit content to container visible area`,
on => 'object-group'
);
@@ -136,20 +136,20 @@ export class PropertiesButtons extends React.Component<{}, {}> {
// containerDoc.noShadow =
// containerDoc.disableDocBrushing =
// containerDoc._forceActive =
- //containerDoc._fitContentsToBox =
+ //containerDoc._freeform_fitContentsToBox =
containerDoc._isLightbox = !containerDoc._isLightbox;
//containerDoc._xPadding = containerDoc._yPadding = containerDoc._isLightbox ? 10 : undefined;
const containerContents = DocListCast(dv.dataDoc[dv.props.fieldKey ?? Doc.LayoutFieldKey(containerDoc)]);
//dv.rootDoc.onClick = ScriptField.MakeScript('{self.data = undefined; documentView.select(false)}', { documentView: 'any' });
- containerContents.forEach(doc => LinkManager.Links(doc).forEach(link => (link.linkDisplay = false)));
+ containerContents.forEach(doc => LinkManager.Links(doc).forEach(link => (link.layout_linkDisplay = false)));
});
}
);
}
- @computed get fitWidthButton() {
+ @computed get layout_fitWidthButton() {
return this.propertyToggleBtn(
'Fit\xA0Width',
- '_fitWidth',
+ '_layout_fitWidth',
on => `${on ? "Don't" : 'Do'} fit content to width of container`,
on => 'arrows-alt-h'
);
@@ -157,10 +157,10 @@ export class PropertiesButtons extends React.Component<{}, {}> {
@computed get captionButton() {
return this.propertyToggleBtn(
'Caption',
- '_showCaption',
+ '_layout_showCaption',
on => `${on ? 'Hide' : 'Show'} caption footer`,
on => 'closed-captioning',
- (dv, doc) => ((dv?.rootDoc || doc)._showCaption = (dv?.rootDoc || doc)._showCaption === undefined ? 'caption' : undefined)
+ (dv, doc) => ((dv?.rootDoc || doc)._layout_showCaption = (dv?.rootDoc || doc)._layout_showCaption === undefined ? 'caption' : undefined)
);
}
@computed get chromeButton() {
@@ -175,20 +175,20 @@ export class PropertiesButtons extends React.Component<{}, {}> {
@computed get titleButton() {
return this.propertyToggleBtn(
'Title',
- '_showTitle',
+ '_layout_showTitle',
on => 'Switch between title styles',
on => 'text-width',
(dv, doc) => {
const tdoc = dv?.rootDoc || doc;
- const newtitle = !tdoc._showTitle ? 'title' : tdoc._showTitle === 'title' ? 'title:hover' : '';
- tdoc._showTitle = newtitle;
+ const newtitle = !tdoc._layout_showTitle ? 'title' : tdoc._layout_showTitle === 'title' ? 'title:hover' : '';
+ tdoc._layout_showTitle = newtitle;
}
);
}
- @computed get autoHeightButton() {
+ @computed get layout_autoHeightButton() {
return this.propertyToggleBtn(
'Auto\xA0Size',
- '_autoHeight',
+ '_layout_autoHeight',
on => `Automatical vertical sizing to show all content`,
on => 'arrows-alt-v'
);
@@ -196,7 +196,7 @@ export class PropertiesButtons extends React.Component<{}, {}> {
@computed get gridButton() {
return this.propertyToggleBtn(
'Grid',
- '_backgroundGridShow',
+ '_freeform_backgroundGrid',
on => `Display background grid in collection`,
on => 'border-all'
);
@@ -236,7 +236,7 @@ export class PropertiesButtons extends React.Component<{}, {}> {
@computed get snapButton() {
return this.propertyToggleBtn(
'Snap\xA0Lines',
- 'showSnapLines',
+ 'freeform_snapLines',
on => `Display snapping lines when objects are dragged`,
on => 'th',
undefined,
@@ -412,12 +412,12 @@ export class PropertiesButtons extends React.Component<{}, {}> {
{toggle(this.captionButton)}
{toggle(this.lockButton)}
{toggle(this.onClickButton)}
- {toggle(this.fitWidthButton)}
+ {toggle(this.layout_fitWidthButton)}
{toggle(this.freezeThumb)}
{toggle(this.forceActiveButton, { display: !isFreeForm && !isMap ? 'none' : '' })}
{toggle(this.fitContentButton, { display: !isFreeForm && !isMap ? 'none' : '' })}
{toggle(this.isLightboxButton, { display: !isFreeForm && !isMap ? 'none' : '' })}
- {toggle(this.autoHeightButton, { display: !isText && !isStacking && !isTree ? 'none' : '' })}
+ {toggle(this.layout_autoHeightButton, { display: !isText && !isStacking && !isTree ? 'none' : '' })}
{toggle(this.maskButton, { display: !isInk ? 'none' : '' })}
{toggle(this.hideImageButton, { display: !isImage ? 'none' : '' })}
{toggle(this.chromeButton, { display: !isCollection || isNovice ? 'none' : '' })}