Merge with 6477f4caeaaeb946ecb31a5b5bd3393e5ed506bd
authorcavaliet
Fri, 25 Oct 2013 11:29:40 +0200
changeset 27 a34c67748b74
parent 26 8d88a6144cb1 (current diff)
parent 25 6477f4caeaae (diff)
child 28 2607ea318318
Merge with 6477f4caeaaeb946ecb31a5b5bd3393e5ed506bd
web/css/ds.css
--- a/web/css/ds.css	Fri Oct 25 11:27:32 2013 +0200
+++ b/web/css/ds.css	Fri Oct 25 11:29:40 2013 +0200
@@ -70,6 +70,7 @@
 
 
 footer {
+	margin-top: 20px;
     padding-bottom: 20px;
     border-top: 5px solid rgb(233, 234, 238);
 }
--- a/web/fullrenkan.html	Fri Oct 25 11:27:32 2013 +0200
+++ b/web/fullrenkan.html	Fri Oct 25 11:29:40 2013 +0200
@@ -181,7 +181,10 @@
      + '          ,{'
      + '              type: "Renkan",'
      + '              container: "RenkanContainer",'
-     + '              data: "http://renkan.iri-research.org/renkan/rest/projects/' + t + '?callback=?"'
+     + '              data: "http://digital-studies.org/rc/renkan/renkan/rest/projects/' + t + '",'
+     + '              renkan_options: {'
+     + '                  zoom_on_scroll: false'
+     + '              }'
 	 + '          }';
 	        }
 	        s += ''
@@ -230,4 +233,4 @@
 	  ga('send', 'pageview');
 </script>
 </body>
-</html>
\ No newline at end of file
+</html>
--- a/web/js/renkan.js	Fri Oct 25 11:27:32 2013 +0200
+++ b/web/js/renkan.js	Fri Oct 25 11:29:40 2013 +0200
@@ -785,6 +785,8 @@
     force_resize: false,
     allow_double_click: true,
         /* Allows Double Click to create a node on an empty background */
+    zoom_on_scroll: true,
+        /* Allows to use the scrollwheel to zoom */
     element_delete_delay: 0,
         /* Delay between clicking on the bin on an element and really deleting it
            Set to 0 for delete confirm */
@@ -2642,9 +2644,11 @@
             _this.onMouseUp(_event, false);
         },
         mousewheel: function(_event, _delta) {
-            _event.preventDefault();
-            if (_allowScroll) {
-                _this.onScroll(_event, _delta);
+            if(_renkan.options.zoom_on_scroll) {
+                _event.preventDefault();
+                if (_allowScroll) {
+                    _this.onScroll(_event, _delta);
+                }
             }
         },
         touchstart: function(_event) {
--- a/web/lib/metadataplayer/Renkan.js	Fri Oct 25 11:27:32 2013 +0200
+++ b/web/lib/metadataplayer/Renkan.js	Fri Oct 25 11:29:40 2013 +0200
@@ -7,7 +7,8 @@
 IriSP.Widgets.Renkan.prototype.defaults = {
     annotation_regexp: /player\/([a-zA-Z0-9_-]+)\/.*id=([a-zA-Z0-9_-]+)/,
     tag_regexp: /search=([^&=]+)/,
-    min_duration: 5000
+    min_duration: 5000,
+    renkan_options: {}
 };
 
 IriSP.Widgets.Renkan.prototype.messages = {
@@ -24,14 +25,15 @@
     this.renderTemplate();
     var _id = IriSP.Model.getUID();
     this.$.find(".Ldt-Renkan").attr("id", _id);
-    this.renkan = new Rkns.Renkan({
+    var renkan_options = IriSP._.extend({
         container: _id,
         editor_mode: false,
         show_bins: false,
         show_top_bar: false,
         force_resize: true,
         language: IriSP.language
-    });
+    }, this.renkan_options);
+    this.renkan = new Rkns.Renkan(renkan_options);
     this.node_times = [];
     var _this = this,
         _list = this.getWidgetAnnotations();