diff options
author | bob <bcz@cs.brown.edu> | 2019-02-20 17:45:22 -0500 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-02-20 17:45:22 -0500 |
commit | fd4f12795e0944ec6e4122274ff7e2f309663192 (patch) | |
tree | b21101bc5b142ccfa6a303f188720dd6da470ac4 /src | |
parent | 0653677ae9fb28916b9671c710e5b1d49ee1be5a (diff) |
more cleanup
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/CollectionSchemaView.tsx | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index e5727f5ac..f3217d55d 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -118,24 +118,8 @@ export class CollectionSchemaView extends CollectionViewBase { } } - @computed - get scale(): number { - return this.props.Document.GetNumber(KeyStore.Scale, 1); - } - @computed - get translate(): [number, number] { - const x = this.props.Document.GetNumber(KeyStore.PanX, 0); - const y = this.props.Document.GetNumber(KeyStore.PanY, 0); - return [x, y]; - } - getTransform = (): Transform => { - return this.props.ScreenToLocalTransform().translate(- COLLECTION_BORDER_WIDTH - this._dividerX - this.DIVIDER_WIDTH, - COLLECTION_BORDER_WIDTH).transform(this.getLocalTransform()) - } - - getLocalTransform = (): Transform => { - const [x, y] = this.translate; - return Transform.Identity.translate(-x, -y).scale(1 / this.scale / this._parentScaling); + return this.props.ScreenToLocalTransform().translate(- COLLECTION_BORDER_WIDTH - this.DIVIDER_WIDTH - this._dividerX, - COLLECTION_BORDER_WIDTH).scale(1 / this._parentScaling); } @action |