Skip to content
Snippets Groups Projects
Commit 08e68da5 authored by Adam Procter's avatar Adam Procter
Browse files

resize height of node to fill content version 1

parent 32897022
No related branches found
No related tags found
No related merge requests found
# 0.1.43
_12th December 2020_
## Fixed
- Partial fix so that nodes will resize to fit content (after dragging into position)
# 0.1.42 # 0.1.42
_11th December 2020_ _11th December 2020_
......
{ {
"name": "nodenogg.in", "name": "nodenogg.in",
"version": "0.1.42", "version": "0.1.43",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
......
...@@ -342,9 +342,12 @@ export default { ...@@ -342,9 +342,12 @@ export default {
this.height = height this.height = height
}, },
onResizestop(x, y, width, height) { onResizestop(x, y, width, height) {
// var nodecontentHeight = document.getElementById(this.nodeid).clientHeight
var localnodeid = this.nodeid var localnodeid = this.nodeid
var zindex var zindex
var i var i
for (i = 0; i < Object.keys(this.configPositions).length; i++) { for (i = 0; i < Object.keys(this.configPositions).length; i++) {
if (this.configPositions[i].node_id == this.nodeid) { if (this.configPositions[i].node_id == this.nodeid) {
this.width = this.configPositions[i].width this.width = this.configPositions[i].width
...@@ -354,6 +357,11 @@ export default { ...@@ -354,6 +357,11 @@ export default {
} }
this.width = width this.width = width
this.height = height this.height = height
// if (nodecontentHeight > this.height) {
// height = nodecontentHeight + 150
// }
this.$store.dispatch('movePos', { this.$store.dispatch('movePos', {
localnodeid, localnodeid,
x, x,
...@@ -375,11 +383,11 @@ export default { ...@@ -375,11 +383,11 @@ export default {
width = this.width width = this.width
height = this.height height = this.height
var i var i
// FIXME: What is this for loop doing ??
if (nodecontentHeight > this.height) { if (nodecontentHeight > this.height) {
this.height = nodecontentHeight + 150 this.height = nodecontentHeight + 150
} }
// FIXME: What is this for loop doing ??
for (i = 0; i < Object.keys(this.configPositions).length; i++) { for (i = 0; i < Object.keys(this.configPositions).length; i++) {
if (this.configPositions[i].node_id == this.nodeid) { if (this.configPositions[i].node_id == this.nodeid) {
this.localx = this.configPositions[i].x_pos this.localx = this.configPositions[i].x_pos
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment