Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pointer Widget not rendering well the first time #111

Open
ivnaru opened this issue Apr 21, 2015 · 10 comments
Open

Pointer Widget not rendering well the first time #111

ivnaru opened this issue Apr 21, 2015 · 10 comments

Comments

@ivnaru
Copy link

ivnaru commented Apr 21, 2015

When I create a pointer widget for the first time, it is rendered as in the picture (the first widget), then I create another one and everything is ok... Does anybody has the same problem?
I have just downloaded freeboard so I haven't done any change to it.

free

@adameickhoff
Copy link

I'm receiving this error when I do it with my local version of freeboard, but I tested it on their site (freeboard.io), and it worked flawlessly. I would recommend updating your local files so that you have the most recent fixes and see if the issue persists.

@adrianbro
Copy link

I am experiencing the same issue

@ivnaru
Copy link
Author

ivnaru commented Jun 3, 2015

I solved it by changing the following line in the render function:

height = $(element).height();

to:

height = this.getHeight()*60;

I don't know if this is the best solution but it works.

@ivnaru ivnaru changed the title Pointer Widget not rendering well the firts time Pointer Widget not rendering well the first time Jun 3, 2015
@nochte
Copy link
Contributor

nochte commented Jun 8, 2015

Acknowledged that height = this.getHeight()*60; seems to work. Can you justify the magic number 60?

@nochte
Copy link
Contributor

nochte commented Jun 8, 2015

Looks like the height used to draw the path is being calculated before the widget is being populated. If I wait to draw the path until afterward, it will render with the given $(element).height(). Let me see where this rabbit hole goes.

@nochte
Copy link
Contributor

nochte commented Jun 8, 2015

Can't seem to break it with this.getHeight() * 60. Will open a PR.

nochte added a commit that referenced this issue Jun 8, 2015
@nochte
Copy link
Contributor

nochte commented Jun 8, 2015

#120

@jcheger
Copy link

jcheger commented Jan 24, 2016

Still have this issue, with the master branch (2016-01-24).
I can't find "height = $(element).height();" in the .min.js files. Are the uncompressed and minimized files unsynced ?

@ghost
Copy link

ghost commented Jan 29, 2016

+1

@Sterling-101
Copy link

Complete necro-post, but it seems this is still an issue on a local server install I've been testing.

Have tried changing the "height = $(element).height();" in freeboard.plugins.js and freeboard_plugins.js but still no change.

Was there anything else done on the problem at all?

chrisv2 added a commit to chrisv2/freeboard that referenced this issue Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants