summaryrefslogtreecommitdiff
path: root/src/www/minibar/minibar_support.js
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2016-06-08 19:11:49 +0000
committerhallgren <hallgren@chalmers.se>2016-06-08 19:11:49 +0000
commit5d27d1885f583a4517d0341897d7d3bee6875df7 (patch)
treefd0e5fb19a7d1429dbe175ed18dd533d14ee0efe /src/www/minibar/minibar_support.js
parenta59821eb803886e9b29b9aac43ee9eeacdc02b93 (diff)
Minibar: show word dependecy diagrams
They are now included in the cycle of images shown when clicking on the parse tree icon.
Diffstat (limited to 'src/www/minibar/minibar_support.js')
-rw-r--r--src/www/minibar/minibar_support.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/www/minibar/minibar_support.js b/src/www/minibar/minibar_support.js
index 749f10d3c..13345ce37 100644
--- a/src/www/minibar/minibar_support.js
+++ b/src/www/minibar/minibar_support.js
@@ -43,6 +43,17 @@ function button_img(url,action) {
return i;
}
+function cycle_images(img_urls) {
+ var current=0;
+ function cycle() {
+ current++;
+ if(current>=img_urls.length) current=0;
+ i.src=img_urls[current]
+ }
+ var i=button_img(img_urls[0],cycle);
+ return i
+}
+
function toggle_img(i) {
var tmp=i.src;
i.src=i.other;