Epsidon / Observatoire

Observatoire de la santé des francophones
2 stars 0 forks source link

spinner #1

Closed gvjourdan closed 10 years ago

gvjourdan commented 10 years ago

count number of requests and kill the spinner only after the last one. Also, please review the code to make sure that if a spinner is killed by timeout, the behavior will remain correct afterwards (e.g. on my tests, it was always killed by timeout)

ghost commented 10 years ago

I have modified the way spinner works. This, hopefully, solves the problem.

Changes are not reflected on the live website, wait for us to update the server then verify if the new model is more robust.

ebourdon commented 10 years ago

I'm afraid it is not fixed. Please see Issue #10.

gvjourdan commented 10 years ago

I ran into the issue again as well. I was zooming in and out between heat map and and DA details, and at some point the spinner stopped being removed on its on and is only killed after 30 seconds.

Javascript console content pasted below. Doesn't seem to contain any useful indication...

event.returnValue is deprecated. Please use the standard event.preventDefault() instead. Creating Map maps.js:30 Creating Layer 0 maps.js:54 Creating Layer 1 maps.js:54 Creating Layer 2 maps.js:54 Creating Layer 3 maps.js:54 Creating Layer 4 maps.js:54 Creating Layer 5 maps.js:54 Creating Layer 6 maps.js:54 Creating Layer 7 maps.js:54 Creating Layer 8 maps.js:54 Creating Layer 9 maps.js:54 Creating Layer 10 maps.js:54 Creating Layer 11 maps.js:54 Creating Layer 12 maps.js:54 Creating Layer 13 maps.js:54 Creating Layer 14 maps.js:54 Creating Layer 15 maps.js:54 Creating Layer 16 maps.js:54 Creating Buffers for Layer 5 buffer index: 36 maps.js:120 Creating Buffers for Layer 5 buffer index: 43 maps.js:120 Creating Buffers for Layer 6 buffer index: 22 maps.js:120 Creating Buffers for Layer 6 buffer index: 29 maps.js:120 Creating Buffers for Layer 7 buffer index: 50 maps.js:120 Creating Buffers for Layer 7 buffer index: 57 maps.js:120 Creating Buffers for Layer 8 buffer index: 64 maps.js:120 Creating Buffers for Layer 8 buffer index: 71 maps.js:120 Creating Buffers for Layer 9 buffer index: 78 maps.js:120 Creating Buffers for Layer 9 buffer index: 85 maps.js:120 Creating Buffers for Layer 10 buffer index: 92 maps.js:120 Creating Buffers for Layer 10 buffer index: 99 maps.js:120 Creating Buffers for Layer 11 buffer index: 106 maps.js:120 Creating Buffers for Layer 11 buffer index: 113 maps.js:120 Adding Layer 16 to the map. maps.js:127 Adding symbol to the map maps.js:130 Setting up accordion maps.js:171 XMLHttpRequest cannot load http://services.arcgisonline.com/ArcGIS/rest/info?f=json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.obs-minorityhealth.ca' is therefore not allowed access. www.obs-minorityhealth.ca/:1 drawLegend was called layerId: 16 maps.js:428 drawLegend was called layerId: 12 maps.js:428 drawLegend was called layerId: 12 maps.js:428 drawLegend was called layerId: 12 maps.js:428 4.3. clickedLayerId: 0 maps.js:340 drawLegend was called layerId: 0 maps.js:428 if(layerLegend)? maps.js:434 drawLegend was called layerId: 12 maps.js:428 4.1. 4.2. maps.js:314 drawLegend was called layerId: 16 maps.js:428 drawLegend was called layerId: 12 maps.js:428 4.1. 4.2. maps.js:314 drawLegend was called layerId: 16 maps.js:428 drawLegend was called layerId: 12 maps.js:428 4.1. 4.2. maps.js:314 drawLegend was called layerId: 16 maps.js:428 drawLegend was called layerId: 12 maps.js:428 4.3. clickedLayerId: 0 maps.js:340 drawLegend was called layerId: 0 maps.js:428 if(layerLegend)? maps.js:434 drawLegend was called layerId: 12 maps.js:428

ghost commented 10 years ago

Hello Dr. Jourdan,

Thank you for the console log. Can you check it on your devices now and let me know how it behaves?

Thank you, Seyed.

ebourdon commented 10 years ago

I tried on my laptop running windows and the Chrome browser and it looks much better than before.

Works fine with Firefox as well.

Also good with Safari.

Actually, it seems that it works just fine now!

ebourdon commented 10 years ago

For sake of good housekeeping, let's consider this issue closed.

If we need to re-visit we can create a new issue.