diff --git a/Toolkit/releases/v1.2/js/osh-debug.js b/Toolkit/releases/v1.2/js/osh-debug.js index 0a18be573d..92184f8a45 100644 --- a/Toolkit/releases/v1.2/js/osh-debug.js +++ b/Toolkit/releases/v1.2/js/osh-debug.js @@ -100,7 +100,7 @@ * @namespace {object} OSH */ var OSH = { - version: '1.3' + version: '1.2' }; window.OSH = OSH; diff --git a/Toolkit/releases/v1.2/js/osh.min.js b/Toolkit/releases/v1.2/js/osh.min.js index 6d6f61c876..844c3a1ea0 100644 --- a/Toolkit/releases/v1.2/js/osh.min.js +++ b/Toolkit/releases/v1.2/js/osh.min.js @@ -1,5 +1,5 @@ !function(){var initializing=!1,fnTest=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.BaseClass=function(){},BaseClass.extend=function(prop){function BaseClass(){!initializing&&this.initialize&&this.initialize.apply(this,arguments)}var _super=this.prototype;initializing=!0;var prototype=new this;initializing=!1;for(var name in prop)"function"==typeof prop[name]&&"function"==typeof _super[name]&&fnTest.test(prop[name])?prototype[name]=function(name,fn){return function(){var tmp=this._super;this._super=_super[name];var ret=fn.apply(this,arguments);return this._super=tmp,ret}}(name,prop[name]):prototype[name]=prop[name];return BaseClass.prototype=prototype,BaseClass.prototype.constructor=BaseClass,BaseClass.extend=arguments.callee,BaseClass}}(); -function isUndefined(object){return void 0===object}function isUndefinedOrNull(object){return void 0===object||null===object}var OSH={version:"1.3"};window.OSH=OSH,window.OSH.Video={},window.OSH.UI={},window.OSH.UI.View={},window.OSH.Styler={},window.OSH.ContextMenu={},window.OSH.DataReceiver={},window.OSH.DataConnector={},window.OSH.Utils={},window.OSH.DataSender={},window.OSH.BASE_WORKER_URL="js/workers"; +function isUndefined(object){return void 0===object}function isUndefinedOrNull(object){return void 0===object||null===object}var OSH={version:"1.2"};window.OSH=OSH,window.OSH.Video={},window.OSH.UI={},window.OSH.UI.View={},window.OSH.Styler={},window.OSH.ContextMenu={},window.OSH.DataReceiver={},window.OSH.DataConnector={},window.OSH.Utils={},window.OSH.DataSender={},window.OSH.BASE_WORKER_URL="js/workers"; !function(){var ua=navigator.userAgent.toLowerCase(),doc=document.documentElement,ie="ActiveXObject"in window,webkit=ua.indexOf("webkit")!==-1,phantomjs=ua.indexOf("phantom")!==-1,android23=ua.search("android [23]")!==-1,chrome=ua.indexOf("chrome")!==-1,gecko=ua.indexOf("gecko")!==-1&&!webkit&&!window.opera&&!ie,win=0===navigator.platform.indexOf("Win"),mobile="undefined"!=typeof orientation||ua.indexOf("mobile")!==-1,msPointer=!window.PointerEvent&&window.MSPointerEvent,pointer=window.PointerEvent||msPointer,ie3d=ie&&"transition"in doc.style,webkit3d="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!android23,gecko3d="MozPerspective"in doc.style,opera12="OTransition"in doc.style,touch=!window.L_NO_TOUCH&&(pointer||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch);OSH.Browser={ie:ie,ielt9:ie&&!document.addEventListener,edge:"msLaunchUri"in navigator&&!("documentMode"in document),webkit:webkit,gecko:gecko,android:ua.indexOf("android")!==-1,android23:android23,chrome:chrome,safari:!chrome&&ua.indexOf("safari")!==-1,win:win,ie3d:ie3d,webkit3d:webkit3d,gecko3d:gecko3d,opera12:opera12,any3d:!window.L_DISABLE_3D&&(ie3d||webkit3d||gecko3d)&&!opera12&&!phantomjs,mobile:mobile,mobileWebkit:mobile&&webkit,mobileWebkit3d:mobile&&webkit3d,mobileOpera:mobile&&window.opera,mobileGecko:mobile&&gecko,touch:!!touch,msPointer:!!msPointer,pointer:!!pointer,retina:(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1}}(); function onMouseUpdate(e){absoluteXposition=e.pageX,absoluteYposition=e.pageY}var MAX_LONG=Math.pow(2,53)+1;OSH.Utils=function(){},OSH.Utils.randomUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){var r=16*Math.random()|0;return("x"==c?r:3&r|8).toString(16)})},OSH.Utils.stampUUID=function(obj){return obj._osh_id=obj._osh_id||OSH.Utils.randomUUID(),obj._osh_id},OSH.Utils.jsonix_XML2JSON=function(xmlStr){SOS_2_0_Module_Factory();return new Jsonix.Context([XLink_1_0,IC_2_0,SMIL_2_0,SMIL_2_0_Language,GML_3_1_1,SWE_1_0_1,GML_3_2_1,OWS_1_1_0,SWE_2_0,SWES_2_0,WSN_T_1,WS_Addr_1_0_Core,OM_2_0,ISO19139_GMD_20070417,ISO19139_GCO_20070417,ISO19139_GSS_20070417,ISO19139_GTS_20070417,ISO19139_GSR_20070417,Filter_2_0,SensorML_2_0,SOS_2_0]).createUnmarshaller().unmarshalString(xmlStr)},OSH.Utils.jsonix_JSON2XML=function(jsonStr){SOS_2_0_Module_Factory();return new Jsonix.Context([XLink_1_0,IC_2_0,SMIL_2_0,SMIL_2_0_Language,GML_3_1_1,SWE_1_0_1,GML_3_2_1,OWS_1_1_0,SWE_2_0,SWES_2_0,WSN_T_1,WS_Addr_1_0_Core,OM_2_0,ISO19139_GMD_20070417,ISO19139_GCO_20070417,ISO19139_GSS_20070417,ISO19139_GTS_20070417,ISO19139_GSR_20070417,Filter_2_0,SensorML_2_0,SOS_2_0]).createMarshaller().marshalString(jsonStr)},OSH.Utils.ParseBytes=function(buffer,offset,type){var view=new DataView(buffer);return{double:function(offset){return{val:view.getFloat64(offset),bytes:8}},float64:function(offset){return{val:view.getFloat64(offset),bytes:8}},float32:function(offset){return{val:view.getFloat32(offset),bytes:4}},signedByte:function(offset){return{val:view.getInt8(offset),bytes:1}},signedInt:function(offset){return{val:view.getInt32(offset),bytes:4}},signedShort:function(offset){return{val:view.getInt16(offset),bytes:2}},unsignedByte:function(offset){return{val:view.getUint8(offset),bytes:1}},unsignedInt:function(offset){return{val:view.getUint32(offset),bytes:4}},unsignedShort:function(offset){return{val:view.getUint16(offset),bytes:2}}}[type](offset)},OSH.Utils.ReadData=function(struct,data,offsetBytes){for(var offset=offsetBytes,i=0;i=0},OSH.Utils.isFirefox=function(){return"undefined"!=typeof InstallTrigger},OSH.Utils.isSafari=function(){return Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0},OSH.Utils.isIE=function(){return!!document.documentMode},OSH.Utils.isChrome=function(){return!!window.chrome&&!!window.chrome.webstore},OSH.Utils.isBlink=function(){return(isChrome||isOpera)&&!!window.CSS};var absoluteXposition=null,absoluteYposition=null;document.addEventListener("mousemove",onMouseUpdate,!1),document.addEventListener("mouseenter",onMouseUpdate,!1),OSH.Utils.getXCursorPosition=function(){return absoluteXposition},OSH.Utils.getYCursorPosition=function(){return absoluteYposition},OSH.Utils.isArrayIntersect=function(a,b){return a.filter(function(element){return b.indexOf(element)>-1}).length>0},OSH.Utils.isElement=function(o){return"object"==typeof HTMLElement?o instanceof HTMLElement:o&&"object"==typeof o&&null!==o&&1===o.nodeType&&"string"==typeof o.nodeName},OSH.Utils.isWebWorker=function(){return"undefined"!=typeof Worker},OSH.Utils.takeScreeshot=function(div){},OSH.Utils.removeCss=function(div,css){css=div.className.replace(css,""),div.className=css},OSH.Utils.addCss=function(div,css){div.setAttribute("class",div.className+" "+css)},OSH.Utils.removeLastCharIfExist=function(value,char){return void 0!==typeof value&&null!==value&&0!==value.length&&value.endsWith("/")?value.substring(0,value.length-1):value}; OSH.EventMap=BaseClass.extend({initialize:function(){this.eventMap={}},observe:function(eventName,fnCallback){void 0!==eventName&&void 0!==fnCallback&&(eventName in this.eventMap||(this.eventMap[eventName]=[]),this.eventMap[eventName].push(fnCallback))},fire:function(eventName,properties){if(void 0!==eventName&&eventName in this.eventMap)for(var fnCallbackArr=this.eventMap[eventName],i=0;i