From b260a715250713e4d3b676ac7cfefc584acaba3d Mon Sep 17 00:00:00 2001 From: Adam Procter <adamprocter@researchnot.es> Date: Fri, 11 Dec 2020 13:56:19 +0000 Subject: [PATCH] now z-index brings node you select to the top --- CHANGELOG.md | 8 ++++++++ app/package.json | 2 +- app/src/components/NodesLayer.vue | 12 +++++------- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4465174..a413a51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# 0.1.41 + +_11th December 2020_ + +### Changed + +- added basic z-index incrementing, when you touch a node it will jump to the front a node gets to within max z-index > 2147483640 all nodes will reset to 0. + # 0.1.40 _9th December 2020_ diff --git a/app/package.json b/app/package.json index 7041aa6..179d7a5 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "nodenogg.in", - "version": "0.1.40", + "version": "0.1.41", "private": true, "scripts": { "serve": "vue-cli-service serve", diff --git a/app/src/components/NodesLayer.vue b/app/src/components/NodesLayer.vue index cf12ef4..a59adea 100644 --- a/app/src/components/NodesLayer.vue +++ b/app/src/components/NodesLayer.vue @@ -276,7 +276,6 @@ export default { for (i = 0; i < Object.keys(this.configPositions).length; i++) { //console.log(Math.max(...this.configPositions[i].z_index)) zindexes.push(this.configPositions[i].z_index) - if (this.configPositions[i].node_id == this.nodeid) { this.width = this.configPositions[i].width this.height = this.configPositions[i].height @@ -287,16 +286,15 @@ export default { var topZ = Math.max(...zindexes) for (i = 0; i < Object.keys(this.configPositions).length; i++) { + if (topZ > 2147483640) { + this.configPositions[i].z_index = 0 + } + if (this.configPositions[i].node_id == this.nodeid) { this.width = this.configPositions[i].width this.height = this.configPositions[i].height - if (topZ > 9999) { - this.configPositions[i].z_index = 0 - } else { - this.configPositions[i].z_index = topZ + 1 - } + this.configPositions[i].z_index = topZ + 1 } - // console.log(Math.max(...zindexes)) } }, onResize(x, y, width, height) { -- GitLab