diff options
Diffstat (limited to 'src/client/views/nodes')
| -rw-r--r-- | src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx | 2 | ||||
| -rw-r--r-- | src/client/views/nodes/ImageBox.tsx | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx b/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx index 44f743a97..ad47b7848 100644 --- a/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx +++ b/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx @@ -943,7 +943,7 @@ export class DocCreatorMenu extends ObservableReactComponent<FieldViewProps> { removeDocument={returnFalse} PanelWidth={() => this._menuDimensions.width - 10} PanelHeight={() => this._menuDimensions.height - 60} - ScreenToLocalTransform={Transform.Identity} + ScreenToLocalTransform={() => new Transform(-this._pageX,-this._pageY, 1)} renderDepth={5} whenChildContentsActiveChanged={emptyFunction} focus={emptyFunction} diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx index 226fad977..c156c80e4 100644 --- a/src/client/views/nodes/ImageBox.tsx +++ b/src/client/views/nodes/ImageBox.tsx @@ -124,15 +124,15 @@ export class ImageBox extends ViewBoxAnnotatableComponent<FieldViewProps>() { { fireImmediately: true, delay: 1000 } ); const { layoutDoc } = this; - // this._disposers.path = reaction( - // () => ({ nativeSize: this.nativeSize, width: NumCast(this.layoutDoc._width) }), - // ({ nativeSize, width }) => { - // if (layoutDoc === this.layoutDoc || !this.layoutDoc._height) { - // this.layoutDoc._height = (width * nativeSize.nativeHeight) / nativeSize.nativeWidth; - // } - // }, - // { fireImmediately: true } - // ); + this._disposers.path = reaction( + () => ({ nativeSize: this.nativeSize, width: NumCast(this.layoutDoc._width) }), + ({ nativeSize, width }) => { + if (layoutDoc === this.layoutDoc || !this.layoutDoc._height) { + this.layoutDoc._height = (width * nativeSize.nativeHeight) / nativeSize.nativeWidth; + } + }, + { fireImmediately: true } + ); this._disposers.scroll = reaction( () => this.layoutDoc.layout_scrollTop, sTop => { |
