Gitlab CSE Unil

Commit 72fccb46 authored by M. Chardon's avatar M. Chardon
Browse files

mantis 239

parent 42406af6
......@@ -230,6 +230,9 @@ define(["paper", "jquery"], function (paper, $) {
gText.data.content = textVal;
gText.children[0].content = textVal;
gText.children[1].content = textVal;
if (gText.data.color) {
gText.children[0].strokeColor = getBackgroundColor(gText.data.color, 0.3);
}
gText.visible = true;
if (selectAfter)
......@@ -285,10 +288,11 @@ define(["paper", "jquery"], function (paper, $) {
blue = parseInt(resulthexa[3], 16);
} else {
//couleur en rgb
var digits = /(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(color);
red = parseInt(digits[2]);
green = parseInt(digits[3]);
blue = parseInt(digits[4]);
var digits = color.match(/rgba?\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)?(?:, ?(\d(?:\.\d?))\))?/);
//var digits = /(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(color+'');
red = parseInt(digits[1]);
green = parseInt(digits[2]);
blue = parseInt(digits[3]);
}
lum = lum || 0;
......
......@@ -18308,6 +18308,9 @@ define('tools/text',["paper", "jquery"], function (paper, $) {
gText.data.content = textVal;
gText.children[0].content = textVal;
gText.children[1].content = textVal;
if (gText.data.color) {
gText.children[0].strokeColor = getBackgroundColor(gText.data.color, 0.3);
}
gText.visible = true;
if (selectAfter)
......@@ -18363,10 +18366,11 @@ define('tools/text',["paper", "jquery"], function (paper, $) {
blue = parseInt(resulthexa[3], 16);
} else {
//couleur en rgb
var digits = /(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(color);
red = parseInt(digits[2]);
green = parseInt(digits[3]);
blue = parseInt(digits[4]);
var digits = color.match(/rgba?\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)?(?:, ?(\d(?:\.\d?))\))?/);
//var digits = /(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(color+'');
red = parseInt(digits[1]);
green = parseInt(digits[2]);
blue = parseInt(digits[3]);
}
lum = lum || 0;
......@@ -35856,7 +35860,7 @@ function($){
!function(c){function e(e){if("string"==typeof e.data&&(e.data={keys:e.data}),e.data&&e.data.keys&&"string"==typeof e.data.keys){var o=e.handler,f=e.data.keys.toLowerCase().split(" ");e.handler=function(a){if(this===a.target||!(/textarea|select/i.test(a.target.nodeName)||c.hotkeys.options.filterTextInputs&&-1<c.inArray(a.target.type,c.hotkeys.textAcceptingInputTypes))){var s="keypress"!==a.type&&c.hotkeys.specialKeys[a.which],e=String.fromCharCode(a.which).toLowerCase(),r="",t={};c.each(["alt","ctrl","shift"],function(e,t){a[t+"Key"]&&s!==t&&(r+=t+"+")}),a.metaKey&&!a.ctrlKey&&"meta"!==s&&(r+="meta+"),a.metaKey&&"meta"!==s&&-1<r.indexOf("alt+ctrl+shift+")&&(r=r.replace("alt+ctrl+shift+","hyper+")),s?t[r+s]=!0:(t[r+e]=!0,t[r+c.hotkeys.shiftNums[e]]=!0,"shift+"===r&&(t[c.hotkeys.shiftNums[e]]=!0));for(var i=0,n=f.length;i<n;i++)if(t[f[i]])return o.apply(this,arguments)}}}}c.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],options:{filterTextInputs:!0}},c.each(["keydown","keyup","keypress"],function(){c.event.special[this]={add:e}})}(jQuery||this.jQuery||window.jQuery);
define("jquery.hotkeys", ["jquery"], function(){});
/*! AdIm - v3.0.1 - 2019-04-26 - Copyright (C) 2019 Université de Lausanne - see licence */
/*! AdIm - v3.0.1 - 2019-05-13 - Copyright (C) 2019 Université de Lausanne - see licence */
define('env/shortcuts',["jquery","paper","signals","adim/config","adim/view","adim/tools","adim/ui","jquery.hotkeys"],function(e,t,n,c,o,i,r){return{"backspace del":[{event:"keydown",ctxt:"edit",fn:function(){return o.removeSelectedItems(),!1}},{event:"keydown",ctxt:"review",fn:function(){return!1}}],space:[{event:"keydown",fn:function(){return e("#tool-pan").click(),!1}},{event:"keyup",fn:function(){return e("#tool-pan").click(),!1}}],a:[{event:"keydown",ctxt:"edit",fn:function(){return e("#tool-select").click(),!1}}],"ctrl+a meta+a":[{event:"keydown",ctxt:"edit",fn:function(){return t.project.activeLayer.children.map(function(e){e.selected=!0}),!1}},{event:"keydown",ctxt:"review",fn:function(){return!1}}],d:[{event:"keydown",ctxt:"edit",fn:function(){return e("#tool-drawing").click(),!1}}],f:[{event:"keydown",ctxt:"edit",fn:function(){return e("#tool-arrow").click(),!1}}],l:[{event:"keydown",ctxt:"edit",fn:function(){return e("#tool-lines").click(),!1}}],c:[{event:"keydown",ctxt:"edit",fn:function(){return e("#tool-ellipse").click(),!1}}],r:[{event:"keydown",ctxt:"edit",fn:function(){return e("#tool-rectangle").click(),!1}}],t:[{event:"keydown",ctxt:"edit",fn:function(){return e("#tool-text").click(),!1}}]}});
/*! Sortable 1.8.4 - MIT | git://github.com/SortableJS/Sortable.git */
......@@ -36216,7 +36220,7 @@ define('tools/marker-ui',[
}
}
);
/*! AdIm - v3.0.1 - 2019-04-26 - Copyright (C) 2019 Université de Lausanne - see licence */
/*! AdIm - v3.0.1 - 2019-05-13 - Copyright (C) 2019 Université de Lausanne - see licence */
define('env/env',["jquery","underscore","paper","signals","adim/config","adim/view","adim/attributes","adim/io","adim/tools","adim/ui","adim/category","env/shortcuts","tools/marker-ui"],function(l,e,o,a,n,c,u,t,i,p,f,s,g){var r={name:"anodate",shortcuts:s,initSignalRouting:function(){console.info("_initSignalRouting from env/anodate"),t.events.annotableLoaded.add(function(e){c.events.annotationRemoved.add(function(e){"marker"===e.data.type&&i.tools.marker.listeners.updateNumbering()}),c.events.imageLoaded.add(function(e){})},100),c.events.annotationsLoaded.add(function(){i.tools.marker.listeners.updateNumbering()},-100),p.events.modeChanged.add(function(e){var a=e.mode;"edit"===a?(l("#annotation-display-panel").hide(),l("#annotation-property-panel").show()):"review"===a&&(l("#annotation-display-panel").show(),l("#annotation-property-panel").hide())})},initUI:function(e){f.init(),g.init(e),l("#tool-colorselect").find(".color-menu").addClass("no-picker"),l(".adim-display-type-selector").find("button").on("click",function(e){var a=l(this),n=!a.hasClass("active"),o=a.data("category");e.metaKey||(a.toggleClass("active",n),"image"===o?u.setImageOpacity(n?100:0,!0):c.toggleItemsByProp({prop:"category",val:o,undef:!0},n))});var a=l("#side-col"),n=l(".canvas-container"),o=l("#canvas-col"),t=l("#side-col-panel-group"),i=l("#alt-side-col-panel-group"),s=l("#shared-annotation-markers-panel");function r(e){a.toggleClass("w-25",e),a.toggleClass("default",!e),o.toggleClass("w-100",!e),e?i.show():i.hide(),t.toggleClass("w-50",e),t.toggleClass("w-100",!e)}function d(e){r(e&&s.find(".collapse").hasClass("show")),e?s.show():s.hide()}d("review"===e.mode),p.events.modeChanged.add(function(e){d("review"===e.mode),p.updateReservedSpace(),p.adjustCanvasToImage()}),s.find(".collapse").on("hidden.bs.collapse",function(){n.css("transition","width 0.2s cubic-bezier(0.25, 0.1, 0.25, 1) 0s"),s.prependTo(t),r(!1),p.updateReservedSpace(),p.adjustCanvasToImage(),n.css("transition","");var e=l("a[href='#"+l(this).attr("id")+"'] .fa-chevron-circle-right");e.removeClass("fa-chevron-circle-right"),e.addClass("fa-chevron-circle-left")}).on("show.bs.collapse",function(){r(!0),s.appendTo(i),p.updateReservedSpace(),p.adjustCanvasToImage();var e=l("a[href='#"+l(this).attr("id")+"'] .fa-chevron-circle-left");e.removeClass("fa-chevron-circle-left"),e.addClass("fa-chevron-circle-right")})}};return Object.defineProperty(r,"style",{get:function(){var e,a=l("#tool-colorselect").find(".color-menu .c4").css("backgroundColor");if(0===a.indexOf("rgb")){var n=a.split(/[(),]/).map(function(e){return parseFloat(e.trim())}).filter(function(e){return!isNaN(e)});e=new o.Color(n[0]/255,n[1]/255,n[2]/255)}else e=new o.Color(a);return{strokeColor:e}}}),r});
/**
......@@ -18308,6 +18308,9 @@ define('tools/text',["paper", "jquery"], function (paper, $) {
gText.data.content = textVal;
gText.children[0].content = textVal;
gText.children[1].content = textVal;
if (gText.data.color) {
gText.children[0].strokeColor = getBackgroundColor(gText.data.color, 0.3);
}
gText.visible = true;
if (selectAfter)
......@@ -18363,10 +18366,11 @@ define('tools/text',["paper", "jquery"], function (paper, $) {
blue = parseInt(resulthexa[3], 16);
} else {
//couleur en rgb
var digits = /(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(color);
red = parseInt(digits[2]);
green = parseInt(digits[3]);
blue = parseInt(digits[4]);
var digits = color.match(/rgba?\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)?(?:, ?(\d(?:\.\d?))\))?/);
//var digits = /(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(color+'');
red = parseInt(digits[1]);
green = parseInt(digits[2]);
blue = parseInt(digits[3]);
}
lum = lum || 0;
......@@ -25359,7 +25363,7 @@ define('popper.js', ['popper.js/popper.min'], function (main) { return main; });
* http://jquery.org/license
*/
!function(a){"function"==typeof define&&define.amd?define('jquery.mousewheel',["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
/*! AdIm - v3.0.1 - 2019-04-26 - Copyright (C) 2019 Université de Lausanne - see licence */
/*! AdIm - v3.0.1 - 2019-05-13 - Copyright (C) 2019 Université de Lausanne - see licence */
define('env/ui-analyse',["jquery","signals","adim/config","adim/view","jquery.bootstrap","jquery.mousewheel"],function(h,a,e,t){var d=h(window),s={graphParamChanged:new a};return{init:function(){d=h(window),h("#mode-selector button[data-href]").click(function(a){a.preventDefault(),document.location.href=h(this).data("href")});var a=h("#analyse-graph-ctrl"),e=h("#graph-col"),n=0;0,d.on("scroll",function(){a.toggleClass("pinned",50<window.scrollY)}).on("resize",function(){var a=e.width();a!==n&&(n=a,t.resize(a),s.graphParamChanged.dispatch({viewWidthChanged:!0}))}).resize(),h("#page-loader").remove();var r=h("#inputGroupSize");r.keydown(function(a){var e=38===a.which?1:40===a.which?-1:0;if(e){a.preventDefault(),a.stopPropagation();var n=parseInt(r.val(),10)+e;0<n&&(r.val(n),s.graphParamChanged.dispatch({groupSize:n}))}}).change(function(){var a=parseInt(r.val(),10);0<a&&s.graphParamChanged.dispatch({groupSize:a})});var c=h("#checkShowConfidence");c.change(function(a){s.graphParamChanged.dispatch({showConfidence:c.is(":checked")})});var i=h("#checkShowDiscordance");i.change(function(){s.graphParamChanged.dispatch({showDiscordance:i.is(":checked")})});var o=h("#checkShowConcordance");o.change(function(){s.graphParamChanged.dispatch({showConcordance:o.is(":checked")})})},events:s}});
/**
......@@ -32990,10 +32994,10 @@ define('adim/ui',[
!function(c){function e(e){if("string"==typeof e.data&&(e.data={keys:e.data}),e.data&&e.data.keys&&"string"==typeof e.data.keys){var o=e.handler,f=e.data.keys.toLowerCase().split(" ");e.handler=function(a){if(this===a.target||!(/textarea|select/i.test(a.target.nodeName)||c.hotkeys.options.filterTextInputs&&-1<c.inArray(a.target.type,c.hotkeys.textAcceptingInputTypes))){var s="keypress"!==a.type&&c.hotkeys.specialKeys[a.which],e=String.fromCharCode(a.which).toLowerCase(),r="",t={};c.each(["alt","ctrl","shift"],function(e,t){a[t+"Key"]&&s!==t&&(r+=t+"+")}),a.metaKey&&!a.ctrlKey&&"meta"!==s&&(r+="meta+"),a.metaKey&&"meta"!==s&&-1<r.indexOf("alt+ctrl+shift+")&&(r=r.replace("alt+ctrl+shift+","hyper+")),s?t[r+s]=!0:(t[r+e]=!0,t[r+c.hotkeys.shiftNums[e]]=!0,"shift+"===r&&(t[c.hotkeys.shiftNums[e]]=!0));for(var i=0,n=f.length;i<n;i++)if(t[f[i]])return o.apply(this,arguments)}}}}c.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],options:{filterTextInputs:!0}},c.each(["keydown","keyup","keypress"],function(){c.event.special[this]={add:e}})}(jQuery||this.jQuery||window.jQuery);
define("jquery.hotkeys", ["jquery"], function(){});
/*! AdIm - v3.0.1 - 2019-04-26 - Copyright (C) 2019 Université de Lausanne - see licence */
/*! AdIm - v3.0.1 - 2019-05-13 - Copyright (C) 2019 Université de Lausanne - see licence */
define('env/shortcuts',["jquery","paper","signals","adim/config","adim/view","adim/tools","adim/ui","jquery.hotkeys"],function(c,n,e,t,i,o,a){function d(n){var t=c("#inputGroupSize");return function(){var e=parseInt(t.val(),10)+n;return 0<e&&t.val(e).change(),!1}}return{"backspace del":[{event:"keydown",ctxt:"edit",fn:function(){return i.removeSelectedItems(),!1}},{event:"keydown",ctxt:"review",fn:function(){return!1}}],space:[{event:"keydown",ctxt:"edit review",fn:function(){return c("#tool-pan").click(),!1}},{event:"keyup",ctxt:"edit review",fn:function(){return c("#tool-pan").click(),!1}}],"1 2 3":{ctxt:"edit",fn:function(e){return 0<n.project.selectedItems.length&&c("#confidence-input").val([e.key]).change().siblings("[data-value]").trigger("mouseleave"),!1}},a:[{event:"keydown",ctxt:"edit",fn:function(){return c("#tool-select").click(),!1}}],"ctrl+a meta+a":[{event:"keydown",ctxt:"edit",fn:function(){return n.project.activeLayer.children.map(function(e){e.selected=!0}),!1}},{event:"keydown",ctxt:"review",fn:function(){return!1}}],c:[{event:"keydown",ctxt:"edit",fn:function(){return c("#tool-concordantstr").is(":disabled")||c("#tool-concordantstr").click(),!1}},{event:"keydown",ctxt:"analysis",fn:function(){var e=c("#checkShowConcordance");return e.val([e.is(":checked")?"off":"on"]).change(),!1}}],d:[{event:"keydown",ctxt:"edit",fn:function(){return c("#tool-discordantstr").is(":disabled")||c("#tool-discordantstr").click(),!1}},{event:"keydown",ctxt:"analysis",fn:function(){var e=c("#checkShowDiscordance");return e.val([e.is(":checked")?"off":"on"]).change(),!1}}],"shift+d shift+c":{ctxt:"edit review",fn:function(){c("#annotation-display-container").find("[data-type-name='concordantstr,discordantstr']").click()}},"e b":[{event:"keydown",ctxt:"edit",fn:function(){return c("#tool-fieldedges").is(":disabled")||c("#tool-fieldedges").click(),!1}}],"shift+e":{ctxt:"edit review",fn:function(){c("#annotation-display-container").find("[data-type-name='fieldedges']").click()}},f:[{event:"keydown",ctxt:"edit",fn:function(){return c("#tool-arrow").click(),!1}}],"shift+i":{ctxt:"edit review",fn:function(){c("#annotation-display-container").find("[data-type-name='image']").click()}},n:[{event:"keydown",ctxt:"analysis",fn:function(){var e=c("#checkShowConfidence");return e.val([e.is(":checked")?"off":"on"]).change(),!1}}],z:[{event:"keydown",ctxt:"edit",fn:function(){return c("#tool-cmsarea").is(":disabled")||c("#tool-cmsarea").click(),!1}}],"shift+z":{ctxt:"edit review",fn:function(){c("#annotation-display-container").find("[data-type-name='cmsarea']").click()}},up:[{event:"keydown",ctxt:"analysis",fn:d(1)}],down:[{event:"keydown",ctxt:"analysis",fn:d(-1)}]}});
/*! AdIm - v3.0.1 - 2019-04-26 - Copyright (C) 2019 Université de Lausanne - see licence */
/*! AdIm - v3.0.1 - 2019-05-13 - Copyright (C) 2019 Université de Lausanne - see licence */
define('env/env',["jquery","underscore","paper","signals","adim/config","adim/view","adim/attributes","adim/io","adim/tools","adim/ui","env/shortcuts"],function(i,t,m,e,g,p,o,n,r,f,a){return{name:"cimaf",shortcuts:a,initSignalRouting:function(){var u;function e(t){if(!(t&&["cmsarea","concordantstr"].indexOf(t.data.type)<0)&&(u||(u=p.getOrCreateUserLayer(g.user.id,g.user.full_name)),u)){var e,n,a,i,o=u.children.filter(function(t){return t.data.type&&"cmsarea"===t.data.type}),r=u.children.filter(function(t){return t.data.type&&"concordantstr"===t.data.type}),s=m.project.getSelectedItems(),d=1===s.length&&"cmsarea"===s[0].data.type?s[0]:null,c=d?d.data.prop.nbConcordances:null,l=r.length;for(a=0;e=o[a];a++){for(i=n=0;i<l;i++)n+=Math.round(e.getIntersections(r[i]).length/2);e.data.prop.nbConcordances=n}null!==c&&d.data.prop.nbConcordances!==c&&f.displayProperties(d)}}console.info("_initSignalRouting from env/cimaf"),r.events.annotationAdded.add(function(t){e(t)},this,100),r.events.annotationChanged.add(function(t){e(1===t.length?t[0]:void 0)},this,100),n.events.annotableLoaded.add(function(t){var e=r.tools.concordantstr,n=r.tools.discordantstr,a=r.tools.cmsarea,i=t.envparam&&t.envparam.cimaf_cut_pos,o=t.envparam&&t.envparam.cimaf_cut_margin;p.events.imageLoaded.add(function(t){i=i||t.raster.scaling.x*t.raster.width/2,o=o||25,e.listeners.onCutPositionChanged(i),e.listeners.onCutMarginChanged(o),n.listeners.onCutPositionChanged(i),a.listeners.onCutPositionChanged(i),a.listeners.onSetAreaWidth(2*o)})},100)},initUI:function(t){i(".adim-display-type-selector").find("button").on("click",function(t){var e=i(this),n=!e.hasClass("active"),a=e.data("typeName");t.metaKey?"image"!==a&&p.selectItemsByType(a):(e.toggleClass("active",n),"image"===a?o.setImageOpacity(n?100:0,!0):(p.toggleItemsByType(e.data("typeName"),n),f.enableTool(a,n)))})}}});
/**
......@@ -18308,6 +18308,9 @@ define('tools/text',["paper", "jquery"], function (paper, $) {
gText.data.content = textVal;
gText.children[0].content = textVal;
gText.children[1].content = textVal;
if (gText.data.color) {
gText.children[0].strokeColor = getBackgroundColor(gText.data.color, 0.3);
}
gText.visible = true;
if (selectAfter)
......@@ -18363,10 +18366,11 @@ define('tools/text',["paper", "jquery"], function (paper, $) {
blue = parseInt(resulthexa[3], 16);
} else {
//couleur en rgb
var digits = /(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(color);
red = parseInt(digits[2]);
green = parseInt(digits[3]);
blue = parseInt(digits[4]);
var digits = color.match(/rgba?\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)?(?:, ?(\d(?:\.\d?))\))?/);
//var digits = /(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(color+'');
red = parseInt(digits[1]);
green = parseInt(digits[2]);
blue = parseInt(digits[3]);
}
lum = lum || 0;
......@@ -35856,10 +35860,10 @@ function($){
!function(c){function e(e){if("string"==typeof e.data&&(e.data={keys:e.data}),e.data&&e.data.keys&&"string"==typeof e.data.keys){var o=e.handler,f=e.data.keys.toLowerCase().split(" ");e.handler=function(a){if(this===a.target||!(/textarea|select/i.test(a.target.nodeName)||c.hotkeys.options.filterTextInputs&&-1<c.inArray(a.target.type,c.hotkeys.textAcceptingInputTypes))){var s="keypress"!==a.type&&c.hotkeys.specialKeys[a.which],e=String.fromCharCode(a.which).toLowerCase(),r="",t={};c.each(["alt","ctrl","shift"],function(e,t){a[t+"Key"]&&s!==t&&(r+=t+"+")}),a.metaKey&&!a.ctrlKey&&"meta"!==s&&(r+="meta+"),a.metaKey&&"meta"!==s&&-1<r.indexOf("alt+ctrl+shift+")&&(r=r.replace("alt+ctrl+shift+","hyper+")),s?t[r+s]=!0:(t[r+e]=!0,t[r+c.hotkeys.shiftNums[e]]=!0,"shift+"===r&&(t[c.hotkeys.shiftNums[e]]=!0));for(var i=0,n=f.length;i<n;i++)if(t[f[i]])return o.apply(this,arguments)}}}}c.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],options:{filterTextInputs:!0}},c.each(["keydown","keyup","keypress"],function(){c.event.special[this]={add:e}})}(jQuery||this.jQuery||window.jQuery);
define("jquery.hotkeys", ["jquery"], function(){});
/*! AdIm - v3.0.1 - 2019-04-26 - Copyright (C) 2019 Université de Lausanne - see licence */
/*! AdIm - v3.0.1 - 2019-05-13 - Copyright (C) 2019 Université de Lausanne - see licence */
define('env/shortcuts',["jquery","paper","signals","adim/config","adim/view","adim/tools","adim/ui","jquery.hotkeys"],function(c,n,e,t,i,o,a){function d(n){var t=c("#inputGroupSize");return function(){var e=parseInt(t.val(),10)+n;return 0<e&&t.val(e).change(),!1}}return{"backspace del":[{event:"keydown",ctxt:"edit",fn:function(){return i.removeSelectedItems(),!1}},{event:"keydown",ctxt:"review",fn:function(){return!1}}],space:[{event:"keydown",ctxt:"edit review",fn:function(){return c("#tool-pan").click(),!1}},{event:"keyup",ctxt:"edit review",fn:function(){return c("#tool-pan").click(),!1}}],"1 2 3":{ctxt:"edit",fn:function(e){return 0<n.project.selectedItems.length&&c("#confidence-input").val([e.key]).change().siblings("[data-value]").trigger("mouseleave"),!1}},a:[{event:"keydown",ctxt:"edit",fn:function(){return c("#tool-select").click(),!1}}],"ctrl+a meta+a":[{event:"keydown",ctxt:"edit",fn:function(){return n.project.activeLayer.children.map(function(e){e.selected=!0}),!1}},{event:"keydown",ctxt:"review",fn:function(){return!1}}],c:[{event:"keydown",ctxt:"edit",fn:function(){return c("#tool-concordantstr").is(":disabled")||c("#tool-concordantstr").click(),!1}},{event:"keydown",ctxt:"analysis",fn:function(){var e=c("#checkShowConcordance");return e.val([e.is(":checked")?"off":"on"]).change(),!1}}],d:[{event:"keydown",ctxt:"edit",fn:function(){return c("#tool-discordantstr").is(":disabled")||c("#tool-discordantstr").click(),!1}},{event:"keydown",ctxt:"analysis",fn:function(){var e=c("#checkShowDiscordance");return e.val([e.is(":checked")?"off":"on"]).change(),!1}}],"shift+d shift+c":{ctxt:"edit review",fn:function(){c("#annotation-display-container").find("[data-type-name='concordantstr,discordantstr']").click()}},"e b":[{event:"keydown",ctxt:"edit",fn:function(){return c("#tool-fieldedges").is(":disabled")||c("#tool-fieldedges").click(),!1}}],"shift+e":{ctxt:"edit review",fn:function(){c("#annotation-display-container").find("[data-type-name='fieldedges']").click()}},f:[{event:"keydown",ctxt:"edit",fn:function(){return c("#tool-arrow").click(),!1}}],"shift+i":{ctxt:"edit review",fn:function(){c("#annotation-display-container").find("[data-type-name='image']").click()}},n:[{event:"keydown",ctxt:"analysis",fn:function(){var e=c("#checkShowConfidence");return e.val([e.is(":checked")?"off":"on"]).change(),!1}}],z:[{event:"keydown",ctxt:"edit",fn:function(){return c("#tool-cmsarea").is(":disabled")||c("#tool-cmsarea").click(),!1}}],"shift+z":{ctxt:"edit review",fn:function(){c("#annotation-display-container").find("[data-type-name='cmsarea']").click()}},up:[{event:"keydown",ctxt:"analysis",fn:d(1)}],down:[{event:"keydown",ctxt:"analysis",fn:d(-1)}]}});
/*! AdIm - v3.0.1 - 2019-04-26 - Copyright (C) 2019 Université de Lausanne - see licence */
/*! AdIm - v3.0.1 - 2019-05-13 - Copyright (C) 2019 Université de Lausanne - see licence */
define('env/env',["jquery","underscore","paper","signals","adim/config","adim/view","adim/attributes","adim/io","adim/tools","adim/ui","env/shortcuts"],function(i,t,m,e,g,p,o,n,r,f,a){return{name:"cimaf",shortcuts:a,initSignalRouting:function(){var u;function e(t){if(!(t&&["cmsarea","concordantstr"].indexOf(t.data.type)<0)&&(u||(u=p.getOrCreateUserLayer(g.user.id,g.user.full_name)),u)){var e,n,a,i,o=u.children.filter(function(t){return t.data.type&&"cmsarea"===t.data.type}),r=u.children.filter(function(t){return t.data.type&&"concordantstr"===t.data.type}),s=m.project.getSelectedItems(),d=1===s.length&&"cmsarea"===s[0].data.type?s[0]:null,c=d?d.data.prop.nbConcordances:null,l=r.length;for(a=0;e=o[a];a++){for(i=n=0;i<l;i++)n+=Math.round(e.getIntersections(r[i]).length/2);e.data.prop.nbConcordances=n}null!==c&&d.data.prop.nbConcordances!==c&&f.displayProperties(d)}}console.info("_initSignalRouting from env/cimaf"),r.events.annotationAdded.add(function(t){e(t)},this,100),r.events.annotationChanged.add(function(t){e(1===t.length?t[0]:void 0)},this,100),n.events.annotableLoaded.add(function(t){var e=r.tools.concordantstr,n=r.tools.discordantstr,a=r.tools.cmsarea,i=t.envparam&&t.envparam.cimaf_cut_pos,o=t.envparam&&t.envparam.cimaf_cut_margin;p.events.imageLoaded.add(function(t){i=i||t.raster.scaling.x*t.raster.width/2,o=o||25,e.listeners.onCutPositionChanged(i),e.listeners.onCutMarginChanged(o),n.listeners.onCutPositionChanged(i),a.listeners.onCutPositionChanged(i),a.listeners.onSetAreaWidth(2*o)})},100)},initUI:function(t){i(".adim-display-type-selector").find("button").on("click",function(t){var e=i(this),n=!e.hasClass("active"),a=e.data("typeName");t.metaKey?"image"!==a&&p.selectItemsByType(a):(e.toggleClass("active",n),"image"===a?o.setImageOpacity(n?100:0,!0):(p.toggleItemsByType(e.data("typeName"),n),f.enableTool(a,n)))})}}});
/**
......@@ -18308,6 +18308,9 @@ define('tools/text',["paper", "jquery"], function (paper, $) {
gText.data.content = textVal;
gText.children[0].content = textVal;
gText.children[1].content = textVal;
if (gText.data.color) {
gText.children[0].strokeColor = getBackgroundColor(gText.data.color, 0.3);
}
gText.visible = true;
if (selectAfter)
......@@ -18363,10 +18366,11 @@ define('tools/text',["paper", "jquery"], function (paper, $) {
blue = parseInt(resulthexa[3], 16);
} else {
//couleur en rgb
var digits = /(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(color);
red = parseInt(digits[2]);
green = parseInt(digits[3]);
blue = parseInt(digits[4]);
var digits = color.match(/rgba?\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)?(?:, ?(\d(?:\.\d?))\))?/);
//var digits = /(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(color+'');
red = parseInt(digits[1]);
green = parseInt(digits[2]);
blue = parseInt(digits[3]);
}
lum = lum || 0;
......@@ -35856,10 +35860,10 @@ function($){
!function(c){function e(e){if("string"==typeof e.data&&(e.data={keys:e.data}),e.data&&e.data.keys&&"string"==typeof e.data.keys){var o=e.handler,f=e.data.keys.toLowerCase().split(" ");e.handler=function(a){if(this===a.target||!(/textarea|select/i.test(a.target.nodeName)||c.hotkeys.options.filterTextInputs&&-1<c.inArray(a.target.type,c.hotkeys.textAcceptingInputTypes))){var s="keypress"!==a.type&&c.hotkeys.specialKeys[a.which],e=String.fromCharCode(a.which).toLowerCase(),r="",t={};c.each(["alt","ctrl","shift"],function(e,t){a[t+"Key"]&&s!==t&&(r+=t+"+")}),a.metaKey&&!a.ctrlKey&&"meta"!==s&&(r+="meta+"),a.metaKey&&"meta"!==s&&-1<r.indexOf("alt+ctrl+shift+")&&(r=r.replace("alt+ctrl+shift+","hyper+")),s?t[r+s]=!0:(t[r+e]=!0,t[r+c.hotkeys.shiftNums[e]]=!0,"shift+"===r&&(t[c.hotkeys.shiftNums[e]]=!0));for(var i=0,n=f.length;i<n;i++)if(t[f[i]])return o.apply(this,arguments)}}}}c.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],options:{filterTextInputs:!0}},c.each(["keydown","keyup","keypress"],function(){c.event.special[this]={add:e}})}(jQuery||this.jQuery||window.jQuery);
define("jquery.hotkeys", ["jquery"], function(){});
/*! AdIm - v3.0.1 - 2019-04-26 - Copyright (C) 2019 Université de Lausanne - see licence */
/*! AdIm - v3.0.1 - 2019-05-13 - Copyright (C) 2019 Université de Lausanne - see licence */
define('env/shortcuts',["jquery","paper","signals","adim/config","adim/view","adim/tools","adim/ui","jquery.hotkeys"],function(e,t,n,c,o,i,r){return{"backspace del":[{event:"keydown",ctxt:"edit",fn:function(){return o.removeSelectedItems(),!1}},{event:"keydown",ctxt:"review",fn:function(){return!1}}],space:[{event:"keydown",fn:function(){return e("#tool-pan").click(),!1}}],a:[{event:"keydown",ctxt:"edit",fn:function(){return e("#tool-select").click(),!1}}],"ctrl+a meta+a":[{event:"keydown",ctxt:"edit",fn:function(){return t.project.activeLayer.children.map(function(e){e.selected=!0}),!1}},{event:"keydown",ctxt:"review",fn:function(){return!1}}],d:[{event:"keydown",ctxt:"edit",fn:function(){return e("#tool-drawing").click(),!1}}],f:[{event:"keydown",ctxt:"edit",fn:function(){return e("#tool-arrow").click(),!1}}],l:[{event:"keydown",ctxt:"edit",fn:function(){return e("#tool-lines").click(),!1}}],c:[{event:"keydown",ctxt:"edit",fn:function(){return e("#tool-ellipse").click(),!1}}],r:[{event:"keydown",ctxt:"edit",fn:function(){return e("#tool-rectangle").click(),!1}}],t:[{event:"keydown",ctxt:"edit",fn:function(){return e("#tool-text").click(),!1}}]}});
/*! AdIm - v3.0.1 - 2019-04-26 - Copyright (C) 2019 Université de Lausanne - see licence */
/*! AdIm - v3.0.1 - 2019-05-13 - Copyright (C) 2019 Université de Lausanne - see licence */
define('env/env',["jquery","underscore","paper","signals","adim/config","adim/view","adim/attributes","adim/io","adim/tools","adim/ui","adim/category","env/shortcuts"],function(d,e,n,a,o,r,c,t,i,p,l,s){var u={name:"geomo",shortcuts:s,initSignalRouting:function(){console.info("_initSignalRouting from env/geomo"),t.events.annotableLoaded.add(function(e){r.events.annotationRemoved.add(function(e){}),r.events.imageLoaded.add(function(e){})},100),r.events.annotationsLoaded.add(function(){},-100),p.events.modeChanged.add(function(e){var n=e.mode;"edit"===n?(d("#annotation-display-panel").hide(),d("#annotation-property-container .property-group").show()):"review"===n&&(d("#annotation-display-panel").show(),d("#annotation-property-container .property-group").hide(),d("#annotation-property-container .comment-prop").show())})},initUI:function(e){l.init({env:u.name}),d(".adim-display-type-selector").find("button").on("click",function(e){var n=d(this),a=!n.hasClass("active"),o=n.data("category");e.metaKey||(n.toggleClass("active",a),"image"===o?c.setImageOpacity(a?100:0,!0):r.toggleItemsByProp({prop:"category",val:o,undef:!0},a))}),d("#side-col");var n=d(".canvas-container"),a=d("#side-col-panel-group"),o=d("#alt-side-col-panel-group"),t=d("#shared-annotation-markers-panel");function i(e){o.toggleClass("hidden",!e),a.toggleClass("col-xs-12",!e).toggleClass("col-xs-6",e)}function s(e){i(e&&t.find(".panel-collapse").hasClass("in")),t.toggleClass("hidden",!e)}s("review"===e.mode),p.events.modeChanged.add(function(e){s("review"===e.mode),p.updateReservedSpace(),p.adjustCanvasToImage()}),t.find(".panel-collapse").on("hidden.bs.collapse",function(){n.css("transition","width 0.2s cubic-bezier(0.25, 0.1, 0.25, 1) 0s"),t.prependTo(a),i(!1),p.updateReservedSpace(),p.adjustCanvasToImage(),n.css("transition","")}).on("show.bs.collapse",function(){i(!0),t.appendTo(o),p.updateReservedSpace(),p.adjustCanvasToImage()})}};return Object.defineProperty(u,"style",{get:function(){}}),u});
/**
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment