viaWebGL icon indicating copy to clipboard operation
viaWebGL copied to clipboard

ES6 (ECMAScript 2015) Javascript support

Open zbackscatter opened this issue 8 years ago • 2 comments

We are experiencing great difficulty running the latest OpenSeaDragonGL on Windows 7 and Visual Studio 2015 as it requires ES6 javascript. OpenSeaDragon runs fine but we would like to introduce OpenSeaDragonGL. Is there a version of OpenSeaDragonGL demo that does not depend on the new standard ES6?

Thanks, Tim

zbackscatter avatar Jan 19 '17 19:01 zbackscatter

Thanks for opening the issue! I didn't realize Visual Studio doesn't support the aspects of ES6 that I used. Let me look at the source code of openseadragongl.js to see which bits rely on ES6.

thejohnhoffer avatar Jan 19 '17 19:01 thejohnhoffer

Here's the relevant ES6 javascript feature used in openseadragongl.js. This is syntactic sugar.

In line 58 of merger:

for (var key of this.and(this.viaGL)) {

In line 65 of adder:

for (var key of this.and(this.defaults)) {

thejohnhoffer avatar Jan 19 '17 19:01 thejohnhoffer