bernii / gauge.js

100% native and cool looking JavaScript gauge
MIT License
1.42k stars 391 forks source link

Demo page doesn't work on Opera 12 (Linux) #2

Closed crunchorn closed 12 years ago

crunchorn commented 12 years ago

Opening demo page in current version of Opera throws following error:

Uncaught exception: DOMException: SYNTAX_ERR

Error thrown at line 311, column 6 in <anonymous function: Gauge.prototype.render>() in http://bernii.github.com/gauge.js/dist/gauge.js:
    grd.addColorStop(1, this.options.colorStop);
called from line 217, column 4 in update() in http://bernii.github.com/gauge.js/:
    demoGauge.render();
Uncaught exception: DOMException: SYNTAX_ERR

Error thrown at line 311, column 6 in <anonymous function: Gauge.prototype.render>() in http://bernii.github.com/gauge.js/dist/gauge.js:
    grd.addColorStop(1, this.options.colorStop);
called from line 130, column 8 in <anonymous function: ValueUpdater.prototype.update>() in http://bernii.github.com/gauge.js/dist/gauge.js:
    this.render();
called from line 422, column 8 in <anonymous function: run>() in http://bernii.github.com/gauge.js/dist/gauge.js:
    if (elem.update())
called from line 31, column 10 in <anonymous function>() in http://bernii.github.com/gauge.js/dist/gauge.js:
    return callback(currTime + timeToCall);
Uncaught exception: DOMException: SYNTAX_ERR

Error thrown at line 311, column 6 in <anonymous function: Gauge.prototype.render>() in http://bernii.github.com/gauge.js/dist/gauge.js:
    grd.addColorStop(1, this.options.colorStop);
called from line 130, column 8 in <anonymous function: ValueUpdater.prototype.update>() in http://bernii.github.com/gauge.js/dist/gauge.js:
    this.render();
called from line 422, column 8 in <anonymous function: run>() in http://bernii.github.com/gauge.js/dist/gauge.js:
    if (elem.update())
called from line 31, column 10 in <anonymous function>() in http://bernii.github.com/gauge.js/dist/gauge.js:
    return callback(currTime + timeToCall);

Environment

browser: Opera/9.80 (X11; Linux x86_64; U; pl) Presto/2.10.289 Version/12.00 (Core 2.10.289) os: Ubuntu x64 12.04

j-hernandez commented 12 years ago

Confirmed in Opera 12 on Win7

ghost commented 12 years ago

Also confirmed in Firefox 14 and Firefox 17.

The problem is that the colorStart and colorStop in the demo page are being updated to e.g. "6FADCF" instead of "#6FADCF". Without the # the string is not a valid colour specification.

bernii commented 12 years ago

thanks guys, fixed