Git Product home page Git Product logo

Comments (6)

tux3132 avatar tux3132 commented on August 21, 2024

Hi Udo

It's possible :

I have this code

Wind Angle not available Wind Speed not available Speed Over Water not available ...

And 3 gauges in the following script

<script> function showGauge() { var awajauge = new Gauge({ ... }); awajauge.onready = function() { ... }; awajauge.draw(); And so on for the 2 next gauges in the same showGauge() function. All is working fine. Best regards Bernard.

from canvas-gauges.

tux3132 avatar tux3132 commented on August 21, 2024

I don't understand why previous message is in HTML ???

from canvas-gauges.

UdoWeberJR avatar UdoWeberJR commented on August 21, 2024

True as i said "This all happens only when gauges are all first created with new and drawn afterwards." I have an array of gauges, first created, later shown, try to make

var awajauge1 = new Gauge
var awajauge2 = new Gauge
var awajauge3 = new Gauge

awajauge1.onready = function() {
awajauge1.draw();
}

awajauge2.onready = function() {
awajauge2.draw();
}

awajauge3.onready = function() {
awajauge3.draw();
}

and you will see what i am talking about. It´s a problem with the cache image, which does not appear in your case.

from canvas-gauges.

tux3132 avatar tux3132 commented on August 21, 2024

In my case of study the draw() function is outside and after the onready event.
I have tested draw() before the onready, it's not working
As a summary in the showGage() function I have

  • config of the first gauge
  • onready event for this first gauge
  • draw this first gauge
  • config of the second gauge
  • onready event for this second gauge
  • draw this second gauge

and so on

I have encountered your problem when in the showGauge function I put all gauge config first, after all the onready events and last all draw.

But I am not a pro developer, I am a end user, I work on interfacing web browser with navigational instruments connected on a CAN bus.

Best regards.

Bernard.

from canvas-gauges.

Mikhus avatar Mikhus commented on August 21, 2024

Thank you for reporting this bug. It now should be fixed, please update your source code from this repository. Fix done in commit 6234f38

from canvas-gauges.

UdoWeberJR avatar UdoWeberJR commented on August 21, 2024

@tux3132 Thx for trying to help :)
@Mikhus Thx for fixing, nice project :)

from canvas-gauges.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.