diff --git a/ui (gen4)/data.js b/ui (gen4)/data.js index d645be0a..721fc384 100755 --- a/ui (gen4)/data.js +++ b/ui (gen4)/data.js @@ -1908,6 +1908,10 @@ var DataWithTagsPrototype = { return this }, + // XXX + toggleTag: function(tags, gids, action){ + }, + getTags: function(gids){ gids = arguments.length > 1 ? [].slice.call(arguments) : gids gids = gids == null ? this.getImage() : gids diff --git a/ui (gen4)/ui.js b/ui (gen4)/ui.js index 552ed79c..99d41850 100755 --- a/ui (gen4)/ui.js +++ b/ui (gen4)/ui.js @@ -193,6 +193,9 @@ $(function(){ 'ui-animation', 'ui-bounds-indicators', 'ui-current-image-indicator', + + 'image-marks', + 'image-bookmarks', ]) // this publishes all the actions... diff --git a/ui (gen4)/viewer.js b/ui (gen4)/viewer.js index 7232b588..5267499b 100755 --- a/ui (gen4)/viewer.js +++ b/ui (gen4)/viewer.js @@ -1722,6 +1722,87 @@ module.GlobalStateIndicator = Feature({ +//--------------------------------------------------------------------- +var ImageMarkActions = actions.Actions({ + toggleMark: ['', + // XXX make this a real toggler... + function(target, action){ + // XXX do tagging on data and get the correct action if one is not given... + + if(this.ribbons != null){ + this.ribbons.toggleImageMark(target, 'selected', action) + } + + return action + }], + + // mode can be: + // "ribbon" - next marked in current ribbon (default) + // "all" - next marked in sequence + nextMarked: ['', + function(mode){ + mode = mode == null ? 'ribbon' : mode + + // XXX + }], + prevMarked: ['', + function(mode){ + mode = mode == null ? 'ribbon' : mode + + // XXX + }], + + firstMarked: ['', + function(mode){ + mode = mode == null ? 'ribbon' : mode + + // XXX + }], + lastMarked: ['', + function(mode){ + mode = mode == null ? 'ribbon' : mode + + // XXX + }], + + cropMarked: ['', + function(mode){ + mode = mode == null ? 'ribbon' : mode + + // XXX + }], +}) + + +var ImageMarks = +module.ImageMarks = Feature({ + title: '', + doc: '', + + tag: 'image-marks', + + actions: ImageMarkActions, +}) + + + +//--------------------------------------------------------------------- +var ImageBookmarkActions = actions.Actions({ +}) + + +var ImageBookmarks = +module.ImageBookmarks = Feature({ + title: '', + doc: '', + + tag: 'image-bookmarks', + + actions: ImageBookmarkActions, +}) + + + /********************************************************************** * vim:set ts=4 sw=4 : */