aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/ScriptingRepl.scss2
-rw-r--r--src/client/views/collections/collectionSchema/CollectionSchemaView.tsx12
-rw-r--r--src/client/views/nodes/DocumentIcon.tsx7
3 files changed, 10 insertions, 11 deletions
diff --git a/src/client/views/ScriptingRepl.scss b/src/client/views/ScriptingRepl.scss
index adc82238e..5fe176920 100644
--- a/src/client/views/ScriptingRepl.scss
+++ b/src/client/views/ScriptingRepl.scss
@@ -35,6 +35,8 @@
opacity: 0.3;
}
+
+
.scriptingObject-icon {
padding: 3px;
cursor: pointer;
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
index 4abbc7f51..bdf04f47b 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
@@ -260,6 +260,10 @@ export class CollectionSchemaView extends CollectionSubView() {
}
break;
case 'Backspace': {
+ // this._docs.forEach(doc => {
+ // if (!this.childDocs.concat(this.displayedSubCollectionDocs(this.Document)))
+ // });
+ // console.log('backspace detected')
undoable(() => {this._selectedDocs.forEach(d => this._docs.includes(d) && this.removeDoc(d));}, 'delete schema row');
break;
}
@@ -319,12 +323,8 @@ export class CollectionSchemaView extends CollectionSubView() {
let modField = field.slice();
let matches;
let results = new Map<string, string>();
- while ((matches = idPattern.exec(field)) !== null) {
- results.set(matches[0], matches[1].replace(/"/g, ''));
- }
- results.forEach((id, funcId) => {
- modField = modField.replace(funcId, 'd' + (DocumentView.getDocViewIndex(IdToDoc(id))).toString());
- })
+ while ((matches = idPattern.exec(field)) !== null) {results.set(matches[0], matches[1].replace(/"/g, '')); }
+ results.forEach((id, funcId) => {modField = modField.replace(funcId, 'd' + (DocumentView.getDocViewIndex(IdToDoc(id))).toString());})
return modField;
}
diff --git a/src/client/views/nodes/DocumentIcon.tsx b/src/client/views/nodes/DocumentIcon.tsx
index 79fc06279..0b94ae4f7 100644
--- a/src/client/views/nodes/DocumentIcon.tsx
+++ b/src/client/views/nodes/DocumentIcon.tsx
@@ -25,19 +25,16 @@ export class DocumentIcon extends ObservableReactComponent<DocumentIconProps> {
render() {
const { view } = this._props;
- const { left, top, right } = view.getBounds || { left: 0, top: 0, right: 0, bottom: 0 };
+ const { left, top, right, bottom } = view.getBounds || { left: 0, top: 0, right: 0, bottom: 0 };
return (
<div
className="documentIcon-outerDiv"
- onPointerEnter={action(() => { this._hovered = true; })} // prettier-ignore
- onPointerLeave={action(() => { this._hovered = false; })} // prettier-ignore
style={{
pointerEvents: 'all',
- opacity: this._hovered ? 0.3 : 1,
position: 'absolute',
background: SnappingManager.userBackgroundColor,
- transform: `translate(${(left + right) / 2}px, ${top}px)`,
+ transform: `translate(${left}px, ${bottom - (bottom - top)/2}px)`, //**!**
}}>
<Tooltip title={<div>{StrCast(this._props.view.Document?.title)}</div>}>
<p>d{this._props.index}</p>