aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PropertiesButtons.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-10-21 00:41:23 -0400
committerbobzel <zzzman@gmail.com>2023-10-21 00:41:23 -0400
commit661c1367d27fa23c3aeb62369e92cd36eb5edabd (patch)
tree6887e62707fae03149bc2bbaec38c30e2a944f82 /src/client/views/PropertiesButtons.tsx
parent3ba733ffffb3036ea941bdbb5baf4c79bc7764af (diff)
change to doc decorations to be more "lightweight". made linkBox render links in a freeform view as a DocView. added an auto-reset view option for freeforms. fixed highlighting ink strokes. Made groups behave better for selecting things 'inside' the group bounding box that aren't in the group. Added vertically centered text option.
Diffstat (limited to 'src/client/views/PropertiesButtons.tsx')
-rw-r--r--src/client/views/PropertiesButtons.tsx15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx
index d1561fd67..61aa616ec 100644
--- a/src/client/views/PropertiesButtons.tsx
+++ b/src/client/views/PropertiesButtons.tsx
@@ -61,8 +61,8 @@ export class PropertiesButtons extends React.Component<{}, {}> {
text={label(targetDoc?.[property])}
color={SettingsManager.userColor}
icon={icon(targetDoc?.[property] as any)}
- iconPlacement={'left'}
- align={'flex-start'}
+ iconPlacement="left"
+ align="flex-start"
fillWidth={true}
toggleType={ToggleType.BUTTON}
onClick={undoable(() => {
@@ -173,6 +173,16 @@ export class PropertiesButtons extends React.Component<{}, {}> {
);
}
+ @computed get verticalAlignButton() {
+ //select text
+ return this.propertyToggleBtn(
+ on => (on ? 'ALIGN TOP' : 'ALIGN CENTER'),
+ '_layout_centered',
+ on => `${on ? 'Text is aligned with top of document' : 'Text is aligned with center of document'} `,
+ on => <MdTouchApp /> // 'eye'
+ );
+ }
+
@computed get fitContentButton() {
return this.propertyToggleBtn(
on => (on ? 'PREVIOUS VIEW' : 'VIEW ALL'), //'View All',
@@ -512,6 +522,7 @@ export class PropertiesButtons extends React.Component<{}, {}> {
{toggle(this.layout_fitWidthButton)}
{/* {toggle(this.freezeThumb)} */}
{toggle(this.forceActiveButton)}
+ {toggle(this.verticalAlignButton, { display: !isText ? 'none' : '' })}
{toggle(this.fitContentButton, { display: !isFreeForm && !isMap ? 'none' : '' })}
{/* {toggle(this.isLightboxButton, { display: !isFreeForm && !isMap ? 'none' : '' })} */}
{toggle(this.layout_autoHeightButton, { display: !isText && !isStacking && !isTree ? 'none' : '' })}