update renkan and metadataplayer to stop zooming on scroll + small css correction
--- a/web/css/ds.css Thu Oct 24 18:48:39 2013 +0200
+++ b/web/css/ds.css Fri Oct 25 01:52:53 2013 +0200
@@ -58,6 +58,7 @@
footer {
+ margin-top: 20px;
padding-bottom: 20px;
border-top: 5px solid rgb(233, 234, 238);
}
--- a/web/fullrenkan.html Thu Oct 24 18:48:39 2013 +0200
+++ b/web/fullrenkan.html Fri Oct 25 01:52:53 2013 +0200
@@ -181,7 +181,10 @@
+ ' ,{'
+ ' type: "Renkan",'
+ ' container: "RenkanContainer",'
- + ' data: "http://renkan.iri-research.org/renkan/rest/projects/' + t + '?callback=?"'
+ + ' data: "http://renkan.iri-research.org/renkan/rest/projects/' + t + '?callback=?",'
+ + ' 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 Thu Oct 24 18:48:39 2013 +0200
+++ b/web/js/renkan.js Fri Oct 25 01:52:53 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 Thu Oct 24 18:48:39 2013 +0200
+++ b/web/lib/metadataplayer/Renkan.js Fri Oct 25 01:52:53 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();