From 08e68da5fc78c1f776a6a69f78b15b7d11ff7d7b Mon Sep 17 00:00:00 2001 From: Adam Procter <adamprocter@researchnot.es> Date: Sat, 12 Dec 2020 14:44:13 +0000 Subject: [PATCH] resize height of node to fill content version 1 --- CHANGELOG.md | 8 ++++++++ app/package.json | 2 +- app/src/components/NodesLayer.vue | 12 ++++++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f2998d..7e5f9bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# 0.1.43 + +_12th December 2020_ + +## Fixed + +- Partial fix so that nodes will resize to fit content (after dragging into position) + # 0.1.42 _11th December 2020_ diff --git a/app/package.json b/app/package.json index 58423f4..9ad7f0c 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "nodenogg.in", - "version": "0.1.42", + "version": "0.1.43", "private": true, "scripts": { "serve": "vue-cli-service serve", diff --git a/app/src/components/NodesLayer.vue b/app/src/components/NodesLayer.vue index acdfb86..ff13bf6 100644 --- a/app/src/components/NodesLayer.vue +++ b/app/src/components/NodesLayer.vue @@ -342,9 +342,12 @@ export default { this.height = height }, onResizestop(x, y, width, height) { + // var nodecontentHeight = document.getElementById(this.nodeid).clientHeight + var localnodeid = this.nodeid var zindex var i + for (i = 0; i < Object.keys(this.configPositions).length; i++) { if (this.configPositions[i].node_id == this.nodeid) { this.width = this.configPositions[i].width @@ -354,6 +357,11 @@ export default { } this.width = width this.height = height + + // if (nodecontentHeight > this.height) { + // height = nodecontentHeight + 150 + // } + this.$store.dispatch('movePos', { localnodeid, x, @@ -375,11 +383,11 @@ export default { width = this.width height = this.height var i - // FIXME: What is this for loop doing ?? + if (nodecontentHeight > this.height) { this.height = nodecontentHeight + 150 } - + // FIXME: What is this for loop doing ?? for (i = 0; i < Object.keys(this.configPositions).length; i++) { if (this.configPositions[i].node_id == this.nodeid) { this.localx = this.configPositions[i].x_pos -- GitLab