From a78e1f72513102a0c33402609179b07e1afe0606 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Thu, 14 Dec 2017 12:29:28 +0100 Subject: [PATCH] Fix 2d rendering order after selection --- package.json | 1 + src/d2/ShapesManager.js | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 84288be..3007d54 100755 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "fit-curve": "^0.1.6", "imports-loader": "^0.7.1", "keycode": "^2.1.9", + "lodash": "^4.17.4", "memoizee": "^0.3.9", "pouchdb": "^6.3.4", "proptypes": "^1.1.0", diff --git a/src/d2/ShapesManager.js b/src/d2/ShapesManager.js index b022184..f365b63 100644 --- a/src/d2/ShapesManager.js +++ b/src/d2/ShapesManager.js @@ -1,5 +1,5 @@ import { shapeDataToShape, determineActiveShape2d } from '../shape/shapeDataUtils.js'; -// import R from 'ramda'; +import _ from 'lodash'; export default class ShapesManager { constructor(objectContainerActive, objectContainerInactive) { @@ -21,11 +21,9 @@ export default class ShapesManager { if ( this._objectsById === objectsById && - true && + _.isEqual(activeShapes, this._activeShapes) && state.activeSpace === this._activeSpace - ) { - return needRender; - } + ) return needRender; // object ids that are in the current space const spaceObjectIds = state.spaces[state.activeSpace].objectIds;