Skip to content
Snippets Groups Projects
Commit b7316f55 authored by Neil Gershenfeld's avatar Neil Gershenfeld
Browse files

show progress

parent 401a9af9
No related branches found
No related tags found
No related merge requests found
...@@ -219,6 +219,10 @@ function calculate_path() { ...@@ -219,6 +219,10 @@ function calculate_path() {
var url = window.URL.createObjectURL(blob) var url = window.URL.createObjectURL(blob)
var webworker = new Worker(url) var webworker = new Worker(url)
webworker.addEventListener('message',function(evt) { webworker.addEventListener('message',function(evt) {
if (evt.data.type == "progress") {
mod.label.nodeValue = evt.data.value
return
}
// //
// webworker handler // webworker handler
// //
...@@ -389,11 +393,15 @@ function calculate_path_worker() { ...@@ -389,11 +393,15 @@ function calculate_path_worker() {
dy = 0 dy = 0
} }
} }
//
// update progress
//
self.postMessage({type:'progress',value:ycur})
} }
// //
// return // return
// //
self.postMessage({path:path}) self.postMessage({type:'path',path:path})
self.close() self.close()
}) })
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment