EvotecIT/PSWriteHTML

HTMLDiagram keeps expanding without height

Closed this issue · 14 comments

whoot commented

I just found a funny bug. Instead of using the maximum height of a Section for the diagram, the diagram keeps expanding when not specifying the height.

Example:

Dashboard -Name 'Test' -UseCssLinks:$true -UseJavaScriptLinks:$true -FilePath $PSScriptRoot\test.html -Show {
	Tab -Name 'Test' {
		Section -Name "Test" {
			New-HTMLDiagram {
				New-DiagramOptionsPhysics -Enabled $false
				New-DiagramOptionsInteraction -Hover $true
				
				New-DiagramNode -Label "test1" -ColorBackground Black -FontColor White -Shape box
				New-DiagramNode -Label "test2" -ColorBackground Black -FontColor White -Shape box

				New-DiagramLink -From "test1" -To "test2" -ArrowsFromEnabled $true -ArrowsToEnabled $true
			}
		}
	}
}

What does it mean to keep expanding? I don't see anything wrong with that HTML?

removed comment, wrong issue.

whoot commented

What does it mean to keep expanding? I don't see anything wrong with that HTML?

Try it yourself. The Diagram (its not a table) keeps getting bigger and bigger

I did try

I did try it - that's why I said nothing wrong with it.

whoot commented

weird.. what browser did you use? Im on the current firefox (73.0)

Checked again: same behavior in IE, only in Edge and Chrome it works as intended

Chrome / Edge. But just tested in firefox 70, closed it, updated to 72, closed it updated to 73 and it still works.

Ok, i see what you mean now.

But i would say something changed in 73.

Here's what it's like in 70.

Firefox

I'll play with it when I get some time. Not a priority tho

whoot commented

Nah, as you can see 70 is also affected. The section box itself keeps expanding.
You can even see it in the gif

It expands because I press F5. In Firefox 73 and IE it auto expands by just waiting.

Anyways, it's a bug. Thanks for reporting. Probably need to update Vis.js to new version and test.

whoot commented

It expands because I press F5. In Firefox 73 and IE it auto expands by just waiting.

Exactly. Thats what i meant.

Feel free to try and tackle it ;) It's just a matter of playing a lot with new Visjs and seeing if it fixes this issue or not :)