diff --git a/.directory b/.directory new file mode 100644 index 0000000..9cba580 --- /dev/null +++ b/.directory @@ -0,0 +1,6 @@ +[Dolphin] +Timestamp=2013,6,9,21,16,48 +Version=3 + +[Settings] +HiddenFilesShown=true diff --git a/Gruntfile.js b/Gruntfile.js index 6e03b8e..69c4240 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -39,8 +39,8 @@ module.exports = function(grunt) { options: { urls: (function() { var res = []; - ['2.0.1', '1.10.0', '1.9.1', '1.8.3' ].forEach( function(jqversion) { - ['1.10.3', '1.9.2', '1.8.24'].forEach( function(uiversion) { + ['2.1.0', '2.0.3', '1.10.2', '1.9.1', '1.8.3' ].forEach( function(jqversion) { + ['1.10.4', '1.9.2', '1.8.24'].forEach( function(uiversion) { this.push('http://localhost:<%= connect.server.options.port %>/test/imgNotes.html?jquery=' + jqversion + '&jquery-ui=' + uiversion); }, this); }, res); diff --git a/README.md b/README.md index ea722af..128005b 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,9 @@ The plugin is known to work with the configuration described below: * [jQuery](http://jquery.com/) (>=1.8) * [jQuery UI](http://jqueryui.com/) (>=1.8) * [Widget Factory](http://api.jqueryui.com/jQuery.widget/) - * [jQuery Mousewheel](http://brandonaaron.net/code/mousewheel/docs) (>=3.0) - * [jQuery imgViewer](https://github.com/waynegm/imgViewer) (>=0.6.0) + * [toe.js](https://github.com/visiongeist/toe.js) (>=3.0) + * [Zoetrope](https://github.com/benplum/Zoetrope) (>=3.0) + * [jQuery imgViewer](https://github.com/waynegm/imgViewer) (>=0.7.0) ## Usage @@ -34,7 +35,8 @@ Include either the development version or minified production version of the JS ... - + + ... @@ -107,6 +109,15 @@ $("#image1").imgNotes("option", "zoomStep", 0.05); $("#image1").imgNotes("option", "zoom", 3); ``` +###zoomable + * Controls if image will be zoomable + * Default: true + * Example - to disble image zooming: + +```javascript +$("#image1").imgNotes("option", "zoomable", false); +``` + ###onAdd * Callback triggered when a marker/note is added to the widget to allow developers to define their own markers This will happen when notes are imported using the "import" method and when the user clicks on the widget in edit mode @@ -193,3 +204,7 @@ Copyright (c) 2013 Wayne Mogg. ## Release History ### 0.6 First release +### 0.7 +Update to work with imgViewer 0.7 +Add zoomable option to disable zooming +Updated Grunfile.js to include tests against latest version (2.1.0) of jQuery. \ No newline at end of file diff --git a/dist/imgNotes.js b/dist/imgNotes.js index fedaa04..d8d59fd 100644 --- a/dist/imgNotes.js +++ b/dist/imgNotes.js @@ -1,11 +1,12 @@ -/*! jQuery imgNotes - v0.6.0 - 2013-06-09 +/*! jQuery imgNotes - v0.7.0 - 2014-06-19 * https://github.com/waynegm/imgNotes -* Copyright (c) 2013 Wayne Mogg; Licensed MIT */ +* Copyright (c) 2014 Wayne Mogg; Licensed MIT */ ;(function($) { $.widget("wgm.imgNotes", { options: { zoom: 1, zoomStep: 0.1, + zoomable: true, canEdit: false, vAll: "middle", hAll: "middle", @@ -120,7 +121,10 @@ $.each(self.notes, function() { self._updateMarkerPos(this); }); - } + }, + zoom: self.options.zoom, + zoomStep: self.options.zoomStep, + zoomable: self.options.zoomable }); }, /* @@ -162,6 +166,9 @@ case 'zoomStep': $(this.img).imgViewer("option", "zoomStep", value); break; + case 'zoomable': + $(this.img).imgViewer("option", "zoomable", value); + break; } }, diff --git a/dist/imgNotes.min.js b/dist/imgNotes.min.js index 0000efe..294a7b7 100644 --- a/dist/imgNotes.min.js +++ b/dist/imgNotes.min.js @@ -1,4 +1,4 @@ -/*! jQuery imgNotes - v0.6.0 - 2013-06-09 +/*! jQuery imgNotes - v0.7.0 - 2014-06-19 * https://github.com/waynegm/imgNotes -* Copyright (c) 2013 Wayne Mogg; Licensed MIT */ -(function(t){t.widget("wgm.imgNotes",{options:{zoom:1,zoomStep:.1,canEdit:!1,vAll:"middle",hAll:"middle",onAdd:function(){return this.options.vAll="bottom",this.options.hAll="middle",t(document.createElement("span")).addClass("marker black").html(this.noteCount)},onEdit:function(e,i){var o=t(i);return t("#NoteDialog").remove(),t('
').dialog({title:"Note Editor",resizable:!1,modal:!0,height:"300",width:"450",position:{my:"left bottom",at:"right top",of:i},buttons:{Save:function(){var e=t("textarea",this).val();o.data("note",e),t(this).dialog("close")},Delete:function(){o.trigger("remove"),t(this).dialog("close")},Cancel:function(){t(this).dialog("close")}},open:function(){t(this).css("overflow","hidden");var e=t('