Commit 625086b0 authored by p x's avatar p x
Browse files

init

parent 5e9d2300
Pipeline #3100 failed with stages
in 0 seconds
.cesium-lighter .cesium-navigation-help-instructions{border:1px solid #759dc0;background-color:hsla(0,0%,100%,.9)}.cesium-lighter .cesium-navigation-help-pan{color:#6ce;font-weight:700}.cesium-lighter .cesium-navigation-help-zoom{color:#65ec00;font-weight:700}.cesium-lighter .cesium-navigation-help-rotate{color:#eec722;font-weight:700}.cesium-lighter .cesium-navigation-help-tilt{color:#d800d8;font-weight:700}.cesium-lighter .cesium-navigation-help-details{color:#222}.cesium-lighter .cesium-navigation-button{color:#222;border-top:1px solid #759dc0;border-right:1px solid #759dc0}.cesium-lighter .cesium-navigation-button-selected{background-color:rgba(196,225,255,.9)}.cesium-lighter .cesium-navigation-button-unselected{background-color:rgba(226,240,255,.9)}.cesium-lighter .cesium-navigation-button-unselected:hover{background-color:rgba(166,210,255,.9)}
\ No newline at end of file
.cesium-performance-watchdog-message-area{position:relative;background-color:#ff0;color:#000;padding:10px}.cesium-performance-watchdog-message{margin-right:30px}.cesium-performance-watchdog-message-dismiss{position:absolute;right:0;margin:0 10px 0 0}
\ No newline at end of file
import defined from"../../Core/defined.js";import destroyObject from"../../Core/destroyObject.js";import DeveloperError from"../../Core/DeveloperError.js";import knockout from"../../ThirdParty/knockout.js";import getElement from"../getElement.js";import PerformanceWatchdogViewModel from"./PerformanceWatchdogViewModel.js";function PerformanceWatchdog(e){if(!defined(e)||!defined(e.container))throw new DeveloperError("options.container is required.");if(!defined(e.scene))throw new DeveloperError("options.scene is required.");const t=getElement(e.container),o=new PerformanceWatchdogViewModel(e),r=document.createElement("div");r.className="cesium-performance-watchdog-message-area",r.setAttribute("data-bind","visible: showingLowFrameRateMessage");const n=document.createElement("button");n.setAttribute("type","button"),n.className="cesium-performance-watchdog-message-dismiss",n.innerHTML="×",n.setAttribute("data-bind","click: dismissMessage"),r.appendChild(n);const i=document.createElement("div");i.className="cesium-performance-watchdog-message",i.setAttribute("data-bind","html: lowFrameRateMessage"),r.appendChild(i),t.appendChild(r),knockout.applyBindings(o,r),this._container=t,this._viewModel=o,this._element=r}Object.defineProperties(PerformanceWatchdog.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),PerformanceWatchdog.prototype.isDestroyed=function(){return!1},PerformanceWatchdog.prototype.destroy=function(){return this._viewModel.destroy(),knockout.cleanNode(this._element),this._container.removeChild(this._element),destroyObject(this)};export default PerformanceWatchdog;
\ No newline at end of file
import defaultValue from"../../Core/defaultValue.js";import defined from"../../Core/defined.js";import destroyObject from"../../Core/destroyObject.js";import DeveloperError from"../../Core/DeveloperError.js";import FrameRateMonitor from"../../Scene/FrameRateMonitor.js";import knockout from"../../ThirdParty/knockout.js";import createCommand from"../createCommand.js";function PerformanceWatchdogViewModel(e){if(!defined(e)||!defined(e.scene))throw new DeveloperError("options.scene is required.");this._scene=e.scene,this.lowFrameRateMessage=defaultValue(e.lowFrameRateMessage,"This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers."),this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,knockout.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);const s=this;this._dismissMessage=createCommand((function(){s.showingLowFrameRateMessage=!1,s.lowFrameRateMessageDismissed=!0}));const o=FrameRateMonitor.fromScene(e.scene);this._unsubscribeLowFrameRate=o.lowFrameRate.addEventListener((function(){s.lowFrameRateMessageDismissed||(s.showingLowFrameRateMessage=!0)})),this._unsubscribeNominalFrameRate=o.nominalFrameRate.addEventListener((function(){s.showingLowFrameRateMessage=!1}))}Object.defineProperties(PerformanceWatchdogViewModel.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}}),PerformanceWatchdogViewModel.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),destroyObject(this)};export default PerformanceWatchdogViewModel;
\ No newline at end of file
span.cesium-projectionPicker-wrapper{display:inline-block;position:relative;margin:0 3px}.cesium-projectionPicker-visible{visibility:visible;opacity:1;transition:opacity .25s linear}.cesium-projectionPicker-hidden{visibility:hidden;opacity:0;transition:visibility 0s .25s,opacity .25s linear}.cesium-projectionPicker-wrapper .cesium-projectionPicker-none{display:none}.cesium-projectionPicker-wrapper .cesium-projectionPicker-dropDown-icon{box-sizing:border-box;padding:0;margin:3px 0}.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonOrthographic,.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonPerspective{margin:0 0 3px 0}.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonPerspective .cesium-projectionPicker-iconOrthographic{left:100%}.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonOrthographic .cesium-projectionPicker-iconPerspective{left:-100%}.cesium-projectionPicker-wrapper .cesium-projectionPicker-selected{border-color:#2e2;box-shadow:0 0 8px #fff,0 0 8px #fff}
\ No newline at end of file
import defined from"../../Core/defined.js";import destroyObject from"../../Core/destroyObject.js";import DeveloperError from"../../Core/DeveloperError.js";import FeatureDetection from"../../Core/FeatureDetection.js";import knockout from"../../ThirdParty/knockout.js";import getElement from"../getElement.js";import ProjectionPickerViewModel from"./ProjectionPickerViewModel.js";const perspectivePath="M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z",orthographicPath="m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";function ProjectionPicker(e,t){if(!defined(e))throw new DeveloperError("container is required.");if(!defined(t))throw new DeveloperError("scene is required.");e=getElement(e);const o=new ProjectionPickerViewModel(t);o._perspectivePath=perspectivePath,o._orthographicPath=orthographicPath;const i=document.createElement("span");i.className="cesium-projectionPicker-wrapper cesium-toolbar-button",e.appendChild(i);const r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button",r.setAttribute("data-bind",'css: { "cesium-projectionPicker-buttonPerspective": !_orthographic, "cesium-projectionPicker-buttonOrthographic": _orthographic, "cesium-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress, "cesium-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),r.innerHTML='\x3c!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "cesium-projectionPicker-iconPerspective" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "cesium-projectionPicker-iconOrthographic" } --\x3e\x3c!-- /ko --\x3e',i.appendChild(r);const c=document.createElement("button");c.type="button",c.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",c.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && _orthographic), "cesium-projectionPicker-none" : !_orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'),i.appendChild(c);const n=document.createElement("button");n.type="button",n.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",n.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && !_orthographic), "cesium-projectionPicker-none" : _orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'),i.appendChild(n),knockout.applyBindings(o,i),this._viewModel=o,this._container=e,this._wrapper=i,this._closeDropDown=function(e){i.contains(e.target)||(o.dropDownVisible=!1)},FeatureDetection.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(ProjectionPicker.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),ProjectionPicker.prototype.isDestroyed=function(){return!1},ProjectionPicker.prototype.destroy=function(){return this._viewModel.destroy(),FeatureDetection.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),knockout.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),destroyObject(this)};export default ProjectionPicker;
\ No newline at end of file
import defined from"../../Core/defined.js";import destroyObject from"../../Core/destroyObject.js";import DeveloperError from"../../Core/DeveloperError.js";import EventHelper from"../../Core/EventHelper.js";import OrthographicFrustum from"../../Core/OrthographicFrustum.js";import SceneMode from"../../Scene/SceneMode.js";import knockout from"../../ThirdParty/knockout.js";import createCommand from"../createCommand.js";function ProjectionPickerViewModel(e){if(!defined(e))throw new DeveloperError("scene is required.");this._scene=e,this._orthographic=e.camera.frustum instanceof OrthographicFrustum,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,knockout.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);const o=this;knockout.defineProperty(this,"selectedTooltip",(function(){return o._orthographic?o.tooltipOrthographic:o.tooltipPerspective})),this._toggleDropDown=createCommand((function(){o.sceneMode===SceneMode.SCENE2D||o._flightInProgress||(o.dropDownVisible=!o.dropDownVisible)})),this._eventHelper=new EventHelper,this._eventHelper.add(e.morphComplete,(function(e,t,r,i){o.sceneMode=r,o._orthographic=r===SceneMode.SCENE2D||o._scene.camera.frustum instanceof OrthographicFrustum})),this._eventHelper.add(e.preRender,(function(){o._flightInProgress=defined(e.camera._currentFlight)})),this._switchToPerspective=createCommand((function(){o.sceneMode!==SceneMode.SCENE2D&&(o._scene.camera.switchToPerspectiveFrustum(),o._orthographic=!1,o.dropDownVisible=!1)})),this._switchToOrthographic=createCommand((function(){o.sceneMode!==SceneMode.SCENE2D&&(o._scene.camera.switchToOrthographicFrustum(),o._orthographic=!0,o.dropDownVisible=!1)})),this._sceneMode=SceneMode}Object.defineProperties(ProjectionPickerViewModel.prototype,{scene:{get:function(){return this._scene}},toggleDropDown:{get:function(){return this._toggleDropDown}},switchToPerspective:{get:function(){return this._switchToPerspective}},switchToOrthographic:{get:function(){return this._switchToOrthographic}},isOrthographicProjection:{get:function(){return this._orthographic}}}),ProjectionPickerViewModel.prototype.isDestroyed=function(){return!1},ProjectionPickerViewModel.prototype.destroy=function(){this._eventHelper.removeAll(),destroyObject(this)};export default ProjectionPickerViewModel;
\ No newline at end of file
span.cesium-sceneModePicker-wrapper{display:inline-block;position:relative;margin:0 3px}.cesium-sceneModePicker-visible{visibility:visible;opacity:1;transition:opacity .25s linear}.cesium-sceneModePicker-hidden{visibility:hidden;opacity:0;transition:visibility 0s .25s,opacity .25s linear}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-none{display:none}.cesium-sceneModePicker-slide-svg{transition:left 2s;top:0;left:0}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-dropDown-icon{box-sizing:border-box;padding:0;margin:3px 0}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D,.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D,.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView{margin:0 0 3px 0}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D .cesium-sceneModePicker-icon2D{left:100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D .cesium-sceneModePicker-iconColumbusView{left:200%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView .cesium-sceneModePicker-icon3D{left:-200%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D .cesium-sceneModePicker-icon3D,.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView .cesium-sceneModePicker-icon2D{left:-100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D .cesium-sceneModePicker-iconColumbusView{left:100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-selected{border-color:#2e2;box-shadow:0 0 8px #fff,0 0 8px #fff}
\ No newline at end of file
import defined from"../../Core/defined.js";import destroyObject from"../../Core/destroyObject.js";import DeveloperError from"../../Core/DeveloperError.js";import FeatureDetection from"../../Core/FeatureDetection.js";import knockout from"../../ThirdParty/knockout.js";import getElement from"../getElement.js";import SceneModePickerViewModel from"./SceneModePickerViewModel.js";const globePath="m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878 -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132 -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285 11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201 5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461 -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z",flatMapPath="m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z",columbusViewPath="m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";function SceneModePicker(e,o,t){if(!defined(e))throw new DeveloperError("container is required.");if(!defined(o))throw new DeveloperError("scene is required.");e=getElement(e);const c=new SceneModePickerViewModel(o,t);c._globePath=globePath,c._flatMapPath=flatMapPath,c._columbusViewPath=columbusViewPath;const i=document.createElement("span");i.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",e.appendChild(i);const n=document.createElement("button");n.type="button",n.className="cesium-button cesium-toolbar-button",n.setAttribute("data-bind",'css: { "cesium-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),n.innerHTML='\x3c!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --\x3e\x3c!-- /ko --\x3e',i.appendChild(n);const s=document.createElement("button");s.type="button",s.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",s.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),i.appendChild(s);const r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",r.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),i.appendChild(r);const d=document.createElement("button");d.type="button",d.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",d.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),i.appendChild(d),knockout.applyBindings(c,i),this._viewModel=c,this._container=e,this._wrapper=i,this._closeDropDown=function(e){i.contains(e.target)||(c.dropDownVisible=!1)},FeatureDetection.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(SceneModePicker.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),SceneModePicker.prototype.isDestroyed=function(){return!1},SceneModePicker.prototype.destroy=function(){return this._viewModel.destroy(),FeatureDetection.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),knockout.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),destroyObject(this)};export default SceneModePicker;
\ No newline at end of file
import defaultValue from"../../Core/defaultValue.js";import defined from"../../Core/defined.js";import destroyObject from"../../Core/destroyObject.js";import DeveloperError from"../../Core/DeveloperError.js";import EventHelper from"../../Core/EventHelper.js";import SceneMode from"../../Scene/SceneMode.js";import knockout from"../../ThirdParty/knockout.js";import createCommand from"../createCommand.js";function SceneModePickerViewModel(e,o){if(!defined(e))throw new DeveloperError("scene is required.");this._scene=e;const t=this,r=function(e,o,r,i){t.sceneMode=r,t.dropDownVisible=!1};this._eventHelper=new EventHelper,this._eventHelper.add(e.morphStart,r),this._duration=defaultValue(o,2),this.sceneMode=e.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",knockout.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,knockout.defineProperty(this,"selectedTooltip",(function(){const e=t.sceneMode;return e===SceneMode.SCENE2D?t.tooltip2D:e===SceneMode.SCENE3D?t.tooltip3D:t.tooltipColumbusView})),this._toggleDropDown=createCommand((function(){t.dropDownVisible=!t.dropDownVisible})),this._morphTo2D=createCommand((function(){e.morphTo2D(t._duration)})),this._morphTo3D=createCommand((function(){e.morphTo3D(t._duration)})),this._morphToColumbusView=createCommand((function(){e.morphToColumbusView(t._duration)})),this._sceneMode=SceneMode}Object.defineProperties(SceneModePickerViewModel.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(e){if(e<0)throw new DeveloperError("duration value must be positive.");this._duration=e}},toggleDropDown:{get:function(){return this._toggleDropDown}},morphTo2D:{get:function(){return this._morphTo2D}},morphTo3D:{get:function(){return this._morphTo3D}},morphToColumbusView:{get:function(){return this._morphToColumbusView}}}),SceneModePickerViewModel.prototype.isDestroyed=function(){return!1},SceneModePickerViewModel.prototype.destroy=function(){this._eventHelper.removeAll(),destroyObject(this)};export default SceneModePickerViewModel;
\ No newline at end of file
.cesium-selection-wrapper{position:absolute;width:160px;height:160px;pointer-events:none;visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s ease-in}.cesium-selection-wrapper-visible{visibility:visible;opacity:1;transition:opacity .2s ease-out}.cesium-selection-wrapper svg{fill:#2e2;stroke:#000;stroke-width:1.1px}
\ No newline at end of file
import defined from"../../Core/defined.js";import destroyObject from"../../Core/destroyObject.js";import DeveloperError from"../../Core/DeveloperError.js";import knockout from"../../ThirdParty/knockout.js";import getElement from"../getElement.js";import SelectionIndicatorViewModel from"./SelectionIndicatorViewModel.js";function SelectionIndicator(e,t){if(!defined(e))throw new DeveloperError("container is required.");e=getElement(e),this._container=e;const o=document.createElement("div");o.className="cesium-selection-wrapper",o.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "cesium-selection-wrapper-visible" : isVisible }'),e.appendChild(o),this._element=o;const i="http://www.w3.org/2000/svg",n="M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z",r=document.createElementNS(i,"svg:svg");r.setAttribute("width",160),r.setAttribute("height",160),r.setAttribute("viewBox","0 0 160 160");const s=document.createElementNS(i,"g");s.setAttribute("transform","translate(80,80)"),r.appendChild(s);const c=document.createElementNS(i,"path");c.setAttribute("data-bind","attr: { transform: _transform }"),c.setAttribute("d",n),s.appendChild(c),o.appendChild(r);const d=new SelectionIndicatorViewModel(t,this._element,this._container);this._viewModel=d,knockout.applyBindings(this._viewModel,this._element)}Object.defineProperties(SelectionIndicator.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),SelectionIndicator.prototype.isDestroyed=function(){return!1},SelectionIndicator.prototype.destroy=function(){const e=this._container;return knockout.cleanNode(this._element),e.removeChild(this._element),destroyObject(this)};export default SelectionIndicator;
\ No newline at end of file
import Cartesian2 from"../../Core/Cartesian2.js";import defaultValue from"../../Core/defaultValue.js";import defined from"../../Core/defined.js";import DeveloperError from"../../Core/DeveloperError.js";import EasingFunction from"../../Core/EasingFunction.js";import SceneTransforms from"../../Scene/SceneTransforms.js";import knockout from"../../ThirdParty/knockout.js";const screenSpacePos=new Cartesian2,offScreen="-1000px";function SelectionIndicatorViewModel(e,t,o){if(!defined(e))throw new DeveloperError("scene is required.");if(!defined(t))throw new DeveloperError("selectionIndicatorElement is required.");if(!defined(o))throw new DeveloperError("container is required.");this._scene=e,this._screenPositionX=offScreen,this._screenPositionY=offScreen,this._tweens=e.tweens,this._container=defaultValue(o,document.body),this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,knockout.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,knockout.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&defined(this.position)}}),knockout.defineProperty(this,"_transform",{get:function(){return`scale(${this._scale})`}}),this.computeScreenSpacePosition=function(t,o){return SceneTransforms.wgs84ToWindowCoordinates(e,t,o)}}SelectionIndicatorViewModel.prototype.update=function(){if(this.showSelection&&defined(this.position)){const e=this.computeScreenSpacePosition(this.position,screenSpacePos);if(defined(e)){const t=this._container,o=t.parentNode.clientWidth,i=t.parentNode.clientHeight,n=this._selectionIndicatorElement.clientWidth,r=.5*n;e.x=Math.min(Math.max(e.x,-n),o+n)-r,e.y=Math.min(Math.max(e.y,-n),i+n)-r,this._screenPositionX=`${Math.floor(e.x+.25)}px`,this._screenPositionY=`${Math.floor(e.y+.25)}px`}else this._screenPositionX=offScreen,this._screenPositionY=offScreen}},SelectionIndicatorViewModel.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:EasingFunction.EXPONENTIAL_OUT})},SelectionIndicatorViewModel.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:EasingFunction.EXPONENTIAL_OUT})},Object.defineProperties(SelectionIndicatorViewModel.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}});export default SelectionIndicatorViewModel;
\ No newline at end of file
const svgNS="http://www.w3.org/2000/svg",svgClassName="cesium-svgPath-svg",SvgPathBindingHandler={register:function(t){t.bindingHandlers.cesiumSvgPath={init:function(e,s){const n=document.createElementNS(svgNS,"svg:svg");n.setAttribute("class",svgClassName);const i=document.createElementNS(svgNS,"path");return n.appendChild(i),t.virtualElements.setDomNodeChildren(e,[n]),t.computed({read:function(){const e=t.unwrap(s());i.setAttribute("d",t.unwrap(e.path));const a=t.unwrap(e.width),r=t.unwrap(e.height);n.setAttribute("width",a),n.setAttribute("height",r),n.setAttribute("viewBox",`0 0 ${a} ${r}`),e.css&&n.setAttribute("class",`${svgClassName} ${t.unwrap(e.css)}`)},disposeWhenNodeIsRemoved:e}),{controlsDescendantBindings:!0}}},t.virtualElements.allowedBindings.cesiumSvgPath=!0}};export default SvgPathBindingHandler;
\ No newline at end of file
.cesium-timeline-main{position:relative;left:0;bottom:0;overflow:hidden;border:1px solid #888;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.cesium-timeline-trackContainer{width:100%;overflow:auto;border-top:1px solid #888;position:relative;top:0;left:0}.cesium-timeline-tracks{position:absolute;top:0;left:0;width:100%}.cesium-timeline-needle{position:absolute;left:0;top:1.7em;bottom:0;width:1px;background:red}.cesium-timeline-bar{position:relative;left:0;top:0;overflow:hidden;cursor:pointer;width:100%;height:1.7em;background:linear-gradient(180deg,hsla(220,1%,46%,.8) 0,rgba(58,68,82,.8) 11%,rgba(46,50,56,.8) 46%,rgba(53,53,53,.8) 81%,rgba(53,53,53,.8))}.cesium-timeline-ruler{visibility:hidden;white-space:nowrap;font-size:80%;z-index:-200}.cesium-timeline-highlight{position:absolute;bottom:0;left:0;background:#08f}.cesium-timeline-ticLabel{position:absolute;top:0;left:0;white-space:nowrap;font-size:80%;color:#eee}.cesium-timeline-ticMain{position:absolute;bottom:0;left:0;width:1px;height:50%;background:#eee}.cesium-timeline-ticSub{position:absolute;bottom:0;left:0;width:1px;height:33%;background:#aaa}.cesium-timeline-ticTiny{position:absolute;bottom:0;left:0;width:1px;height:25%;background:#888}.cesium-timeline-icon16{display:block;position:absolute;width:16px;height:16px;background-image:url(../Images/TimelineIcons.png);background-repeat:no-repeat}
\ No newline at end of file
import ClockRange from"../../Core/ClockRange.js";import defined from"../../Core/defined.js";import destroyObject from"../../Core/destroyObject.js";import DeveloperError from"../../Core/DeveloperError.js";import JulianDate from"../../Core/JulianDate.js";import getElement from"../getElement.js";import TimelineHighlightRange from"./TimelineHighlightRange.js";import TimelineTrack from"./TimelineTrack.js";let timelineWheelDelta=1e12;const timelineMouseMode={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},timelineTouchMode={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},timelineTicScales=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6],timelineMonthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Timeline(e,t){if(!defined(e))throw new DeveloperError("container is required.");if(!defined(t))throw new DeveloperError("clock is required.");e=getElement(e);const i=e.ownerDocument;this.container=e;const n=i.createElement("div");n.className="cesium-timeline-main",e.appendChild(n),this._topDiv=n,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=t,this._scrubJulian=t.currentTime,this._mainTicSpan=-1,this._mouseMode=timelineMouseMode.none,this._touchMode=timelineTouchMode.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="cesium-timeline-bar"></div><div class="cesium-timeline-trackContainer"><canvas class="cesium-timeline-tracks" width="10" height="1"></canvas></div><div class="cesium-timeline-needle"></div><span class="cesium-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(t.startTime,t.stopTime),this._onMouseDown=createMouseDownCallback(this),this._onMouseUp=createMouseUpCallback(this),this._onMouseMove=createMouseMoveCallback(this),this._onMouseWheel=createMouseWheelCallback(this),this._onTouchStart=createTouchStartCallback(this),this._onTouchMove=createTouchMoveCallback(this),this._onTouchEnd=createTouchEndCallback(this);const o=this._timeBarEle;i.addEventListener("mouseup",this._onMouseUp,!1),i.addEventListener("mousemove",this._onMouseMove,!1),o.addEventListener("mousedown",this._onMouseDown,!1),o.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),o.addEventListener("mousewheel",this._onMouseWheel,!1),o.addEventListener("touchstart",this._onTouchStart,!1),o.addEventListener("touchmove",this._onTouchMove,!1),o.addEventListener("touchend",this._onTouchEnd,!1),o.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}function twoDigits(e){return e<10?`0${e.toString()}`:e.toString()}function createMouseDownCallback(e){return function(t){e._mouseMode!==timelineMouseMode.touchOnly&&(0===t.button?(e._mouseMode=timelineMouseMode.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,2===t.button?e._mouseMode=timelineMouseMode.zoom:e._mouseMode=timelineMouseMode.slide)),t.preventDefault()}}function createMouseUpCallback(e){return function(t){e._mouseMode=timelineMouseMode.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function createMouseMoveCallback(e){return function(t){let i;if(e._mouseMode===timelineMouseMode.scrub){t.preventDefault();const i=t.clientX-e._topDiv.getBoundingClientRect().left;i<0?(e._timelineDragLocation=0,e._timelineDrag=-.01*e._timeBarSecondsSpan):i>e._topDiv.clientWidth?(e._timelineDragLocation=e._topDiv.clientWidth,e._timelineDrag=.01*e._timeBarSecondsSpan):(e._timelineDragLocation=void 0,e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth))}else if(e._mouseMode===timelineMouseMode.slide){if(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i){const t=i*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(JulianDate.addSeconds(e._startJulian,t,new JulianDate),JulianDate.addSeconds(e._endJulian,t,new JulianDate))}}else e._mouseMode===timelineMouseMode.zoom&&(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i&&e.zoomFrom(Math.pow(1.01,i)))}}function createMouseWheelCallback(e){return function(t){let i=t.wheelDeltaY||t.wheelDelta||-t.detail;timelineWheelDelta=Math.max(Math.min(Math.abs(i),timelineWheelDelta),1),i/=timelineWheelDelta,e.zoomFrom(Math.pow(1.05,-i))}}function createTouchStartCallback(e){return function(t){const i=t.touches.length;let n,o;const s=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=timelineMouseMode.touchOnly,1===i?(n=JulianDate.secondsDifference(e._scrubJulian,e._startJulian),o=Math.round(n*e._topDiv.clientWidth/e._timeBarSecondsSpan+s),Math.abs(t.touches[0].clientX-o)<50?(e._touchMode=timelineTouchMode.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=1===i?"-16px 0":"0 0")):(e._touchMode=timelineTouchMode.singleTap,e._touchState.centerX=t.touches[0].clientX-s)):2===i?(e._touchMode=timelineTouchMode.slideZoom,e._touchState.centerX=.5*(t.touches[0].clientX+t.touches[1].clientX)-s,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=timelineTouchMode.ignore}}function createTouchEndCallback(e){return function(t){const i=t.touches.length,n=e._topDiv.getBoundingClientRect().left;e._touchMode===timelineTouchMode.singleTap?(e._touchMode=timelineTouchMode.scrub,e._onTouchMove(t)):e._touchMode===timelineTouchMode.scrub&&e._onTouchMove(t),e._mouseMode=timelineMouseMode.touchOnly,1!==i?e._touchMode=i>0?timelineTouchMode.ignore:timelineTouchMode.none:e._touchMode===timelineTouchMode.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-n),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function createTouchMoveCallback(e){return function(t){let i,n,o,s,a,l,c=1;const h=e._topDiv.getBoundingClientRect().left;e._touchMode===timelineTouchMode.singleTap&&(e._touchMode=timelineTouchMode.slideZoom),e._mouseMode=timelineMouseMode.touchOnly,e._touchMode===timelineTouchMode.scrub?(t.preventDefault(),1===t.changedTouches.length&&(n=t.changedTouches[0].clientX-h,n>=0&&n<=e._topDiv.clientWidth&&e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth))):e._touchMode===timelineTouchMode.slideZoom&&(o=t.touches.length,2===o?(s=.5*(t.touches[0].clientX+t.touches[1].clientX)-h,a=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):1===o&&(s=t.touches[0].clientX-h,a=0),defined(s)&&(a>0&&e._touchState.spanX>0?(c=e._touchState.spanX/a,l=JulianDate.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-s*e._timeBarSecondsSpan*c)/e._topDiv.clientWidth,new JulianDate)):(i=e._touchState.centerX-s,l=JulianDate.addSeconds(e._startJulian,i*e._timeBarSecondsSpan/e._topDiv.clientWidth,new JulianDate)),e.zoomTo(l,JulianDate.addSeconds(l,e._timeBarSecondsSpan*c,new JulianDate)),e._touchState.centerX=s,e._touchState.spanX=a))}}Timeline.prototype.addEventListener=function(e,t,i){this._topDiv.addEventListener(e,t,i)},Timeline.prototype.removeEventListener=function(e,t,i){this._topDiv.removeEventListener(e,t,i)},Timeline.prototype.isDestroyed=function(){return!1},Timeline.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this);const e=this.container.ownerDocument;e.removeEventListener("mouseup",this._onMouseUp,!1),e.removeEventListener("mousemove",this._onMouseMove,!1);const t=this._timeBarEle;t.removeEventListener("mousedown",this._onMouseDown,!1),t.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),t.removeEventListener("mousewheel",this._onMouseWheel,!1),t.removeEventListener("touchstart",this._onTouchStart,!1),t.removeEventListener("touchmove",this._onTouchMove,!1),t.removeEventListener("touchend",this._onTouchEnd,!1),t.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),destroyObject(this)},Timeline.prototype.addHighlightRange=function(e,t,i){const n=new TimelineHighlightRange(e,t,i);return this._highlightRanges.push(n),this.resize(),n},Timeline.prototype.addTrack=function(e,t,i,n){const o=new TimelineTrack(e,t,i,n);return this._trackList.push(o),this._lastHeight=void 0,this.resize(),o},Timeline.prototype.zoomTo=function(e,t){if(!defined(e))throw new DeveloperError("startTime is required.");if(!defined(t))throw new DeveloperError("stopTime is required");if(JulianDate.lessThanOrEquals(t,e))throw new DeveloperError("Start time must come before end time.");if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=JulianDate.secondsDifference(t,e),this._clock&&this._clock.clockRange!==ClockRange.UNBOUNDED){const e=this._clock.startTime,t=this._clock.stopTime,i=JulianDate.secondsDifference(t,e),n=JulianDate.secondsDifference(e,this._startJulian),o=JulianDate.secondsDifference(t,this._endJulian);this._timeBarSecondsSpan>=i?(this._timeBarSecondsSpan=i,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):n>0?(this._endJulian=JulianDate.addSeconds(this._endJulian,n,new JulianDate),this._startJulian=e,this._timeBarSecondsSpan=JulianDate.secondsDifference(this._endJulian,this._startJulian)):o<0&&(this._startJulian=JulianDate.addSeconds(this._startJulian,o,new JulianDate),this._endJulian=t,this._timeBarSecondsSpan=JulianDate.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();const i=document.createEvent("Event");i.initEvent("setzoom",!0,!0),i.startJulian=this._startJulian,i.endJulian=this._endJulian,i.epochJulian=this._epochJulian,i.totalSpan=this._timeBarSecondsSpan,i.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(i)},Timeline.prototype.zoomFrom=function(e){let t=JulianDate.secondsDifference(this._scrubJulian,this._startJulian);e>1||t<0||t>this._timeBarSecondsSpan?t=.5*this._timeBarSecondsSpan:t+=t-.5*this._timeBarSecondsSpan;const i=this._timeBarSecondsSpan-t;this.zoomTo(JulianDate.addSeconds(this._startJulian,t-t*e,new JulianDate),JulianDate.addSeconds(this._endJulian,i*e-i,new JulianDate))},Timeline.prototype.makeLabel=function(e){const t=JulianDate.toGregorianDate(e),i=t.millisecond;let n=" UTC";if(i>0&&this._timeBarSecondsSpan<3600){n=Math.floor(i).toString();while(n.length<3)n=`0${n}`;n=`.${n}`}return`${timelineMonthNames[t.month-1]} ${t.day} ${t.year} ${twoDigits(t.hour)}:${twoDigits(t.minute)}:${twoDigits(t.second)}${n}`},Timeline.prototype.smallestTicInPixels=7,Timeline.prototype._makeTics=function(){const e=this._timeBarEle,t=JulianDate.secondsDifference(this._scrubJulian,this._startJulian),i=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan),n=i-8;let o;const s=this;this._needleEle.style.left=`${i.toString()}px`;let a="";const l=.01,c=31536e6,h=1e-10;let r=0,u=this._timeBarSecondsSpan;u<l?(u=l,this._timeBarSecondsSpan=l,this._endJulian=JulianDate.addSeconds(this._startJulian,l,new JulianDate)):u>c&&(u=c,this._timeBarSecondsSpan=c,this._endJulian=JulianDate.addSeconds(this._startJulian,c,new JulianDate));let d=this._timeBarEle.clientWidth;d<10&&(d=10);const m=this._startJulian,_=Math.min(u/d*1e-5,.4);let p;const D=JulianDate.toGregorianDate(m);p=u>31536e4?JulianDate.fromDate(new Date(Date.UTC(100*Math.floor(D.year/100),0))):u>31536e3?JulianDate.fromDate(new Date(Date.UTC(10*Math.floor(D.year/10),0))):u>86400?JulianDate.fromDate(new Date(Date.UTC(D.year,0))):JulianDate.fromDate(new Date(Date.UTC(D.year,D.month,D.day)));const M=JulianDate.secondsDifference(this._startJulian,JulianDate.addSeconds(p,_,new JulianDate));let f=M+u;function S(e){return Math.floor(M/e)*e}function T(e,t){return Math.ceil(e/t+.5)*t}function v(e){return(e-M)/u}function J(e,t){return e-t*Math.round(e/t)}this._epochJulian=p,this._rulerEle.innerHTML=this.makeLabel(JulianDate.addSeconds(this._endJulian,-l,new JulianDate));let g=this._rulerEle.offsetWidth+20;g<30&&(g=180);const E=r;r-=h;const b={startTime:M,startJulian:m,epochJulian:p,duration:u,timeBarWidth:d,getAlpha:v};this._highlightRanges.forEach((function(e){a+=e.render(b)}));let k=0,w=0,y=0,L=g/d;L>1&&(L=1),L*=this._timeBarSecondsSpan;let B=-1,C=-1;const X=timelineTicScales.length;let W;for(W=0;W<X;++W){const e=timelineTicScales[W];if(++B,k=e,e>L&&e>r)break;C<0&&d*(e/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(C=B)}if(B>0){while(B>0)if(--B,Math.abs(J(k,timelineTicScales[B]))<1e-5){timelineTicScales[B]>=r&&(w=timelineTicScales[B]);break}if(C>=0)while(C<B){if(Math.abs(J(w,timelineTicScales[C]))<1e-5&&timelineTicScales[C]>=r){y=timelineTicScales[C];break}++C}}r=E,r>h&&y<1e-5&&Math.abs(r-k)>h&&(y=r,r<=k+h&&(w=0));let x,$=-999999;if(d*(y/this._timeBarSecondsSpan)>=3)for(o=S(y);o<=f;o=T(o,y))a+=`<span class="cesium-timeline-ticTiny" style="left: ${Math.round(d*v(o)).toString()}px;"></span>`;if(d*(w/this._timeBarSecondsSpan)>=3)for(o=S(w);o<=f;o=T(o,w))a+=`<span class="cesium-timeline-ticSub" style="left: ${Math.round(d*v(o)).toString()}px;"></span>`;if(d*(k/this._timeBarSecondsSpan)>=2){this._mainTicSpan=k,f+=k,o=S(k);const e=JulianDate.computeTaiMinusUtc(p);while(o<=f){let t=JulianDate.addSeconds(m,o-M,new JulianDate);if(k>2.1){const i=JulianDate.computeTaiMinusUtc(t);Math.abs(i-e)>.1&&(o+=i-e,t=JulianDate.addSeconds(m,o-M,new JulianDate))}const i=Math.round(d*v(o)),n=this.makeLabel(t);this._rulerEle.innerHTML=n,x=this._rulerEle.offsetWidth,x<10&&(x=g);const s=i-(x/2-1);s>$?($=s+x+5,a+=`<span class="cesium-timeline-ticMain" style="left: ${i.toString()}px;"></span><span class="cesium-timeline-ticLabel" style="left: ${s.toString()}px;">${n}</span>`):a+=`<span class="cesium-timeline-ticSub" style="left: ${i.toString()}px;"></span>`,o=T(o,k)}}else this._mainTicSpan=-1;a+=`<span class="cesium-timeline-icon16" style="left:${n}px;bottom:0;background-position: 0 0;"></span>`,e.innerHTML=a,this._scrubElement=e.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),b.y=0,this._trackList.forEach((function(e){e.render(s._context,b),b.y+=e.height}))},Timeline.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;const e=this._scrubElement;if(defined(this._scrubElement)){const t=JulianDate.secondsDifference(this._scrubJulian,this._startJulian),i=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==i&&(this._lastXPos=i,e.style.left=i-8+"px",this._needleEle.style.left=`${i}px`)}defined(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(JulianDate.addSeconds(this._startJulian,this._timelineDrag,new JulianDate),JulianDate.addSeconds(this._endJulian,this._timelineDrag,new JulianDate)))},Timeline.prototype._setTimeBarTime=function(e,t){if(e=Math.round(e),this._scrubJulian=JulianDate.addSeconds(this._startJulian,t,new JulianDate),this._scrubElement){const t=e-8;this._scrubElement.style.left=`${t.toString()}px`,this._needleEle.style.left=`${e.toString()}px`}const i=document.createEvent("Event");i.initEvent("settime",!0,!0),i.clientX=e,i.timeSeconds=t,i.timeJulian=this._scrubJulian,i.clock=this._clock,this._topDiv.dispatchEvent(i)},Timeline.prototype.resize=function(){const e=this.container.clientWidth,t=this.container.clientHeight;if(e===this._lastWidth&&t===this._lastHeight)return;this._trackContainer.style.height=`${t}px`;let i=1;this._trackList.forEach((function(e){i+=e.height})),this._trackListEle.style.height=`${i.toString()}px`,this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=i,this._makeTics(),this._lastXPos=void 0,this._lastWidth=e,this._lastHeight=t};export default Timeline;
\ No newline at end of file
import defaultValue from"../../Core/defaultValue.js";import JulianDate from"../../Core/JulianDate.js";function TimelineHighlightRange(t,e,i){this._color=t,this._height=e,this._base=defaultValue(i,0)}TimelineHighlightRange.prototype.getHeight=function(){return this._height},TimelineHighlightRange.prototype.getBase=function(){return this._base},TimelineHighlightRange.prototype.getStartTime=function(){return this._start},TimelineHighlightRange.prototype.getStopTime=function(){return this._stop},TimelineHighlightRange.prototype.setRange=function(t,e){this._start=t,this._stop=e},TimelineHighlightRange.prototype.render=function(t){let e="";if(this._start&&this._stop&&this._color){const i=JulianDate.secondsDifference(this._start,t.epochJulian);let n=Math.round(t.timeBarWidth*t.getAlpha(i));const h=JulianDate.secondsDifference(this._stop,t.epochJulian);let o=Math.round(t.timeBarWidth*t.getAlpha(h))-n;n<0&&(o+=n,n=0),n+o>t.timeBarWidth&&(o=t.timeBarWidth-n),o>0&&(e=`<span class="cesium-timeline-highlight" style="left: ${n.toString()}px; width: ${o.toString()}px; bottom: ${this._base.toString()}px; height: ${this._height}px; background-color: ${this._color};"></span>`)}return e};export default TimelineHighlightRange;
\ No newline at end of file
import Color from"../../Core/Color.js";import defined from"../../Core/defined.js";import JulianDate from"../../Core/JulianDate.js";function TimelineTrack(t,e,i,a){this.interval=t,this.height=e,this.color=i||new Color(.5,.5,.5,1),this.backgroundColor=a||new Color(0,0,0,0)}TimelineTrack.prototype.render=function(t,e){const i=this.interval.start,a=this.interval.stop,r=e.startJulian,l=JulianDate.addSeconds(e.startJulian,e.duration,new JulianDate);if(JulianDate.lessThan(i,r)&&JulianDate.greaterThan(a,l))t.fillStyle=this.color.toCssColorString(),t.fillRect(0,e.y,e.timeBarWidth,this.height);else if(JulianDate.lessThanOrEquals(i,l)&&JulianDate.greaterThanOrEquals(a,r)){let r,l,n;for(r=0;r<e.timeBarWidth;++r){const t=JulianDate.addSeconds(e.startJulian,r/e.timeBarWidth*e.duration,new JulianDate);!defined(l)&&JulianDate.greaterThanOrEquals(t,i)?l=r:!defined(n)&&JulianDate.greaterThanOrEquals(t,a)&&(n=r)}t.fillStyle=this.backgroundColor.toCssColorString(),t.fillRect(0,e.y,e.timeBarWidth,this.height),defined(l)&&(defined(n)||(n=e.timeBarWidth),t.fillStyle=this.color.toCssColorString(),t.fillRect(l,e.y,Math.max(n-l,1),this.height))}};export default TimelineTrack;
\ No newline at end of file
.cesium-lighter .cesium-timeline-bar{background:linear-gradient(180deg,#eee 0,#fff 50%,#fafafa)}.cesium-lighter .cesium-timeline-ticLabel{color:#000}.cesium-lighter .cesium-timeline-ticMain{position:absolute;bottom:0;left:0;width:1px;height:50%;background:#000}.cesium-lighter .cesium-timeline-ticSub{background:#444}
\ No newline at end of file
import defaultValue from"../Core/defaultValue.js";import defined from"../Core/defined.js";import DeveloperError from"../Core/DeveloperError.js";import knockout from"../ThirdParty/knockout.js";function ToggleButtonViewModel(e,o){if(!defined(e))throw new DeveloperError("command is required.");this._command=e,o=defaultValue(o,defaultValue.EMPTY_OBJECT),this.toggled=defaultValue(o.toggled,!1),this.tooltip=defaultValue(o.tooltip,""),knockout.track(this,["toggled","tooltip"])}Object.defineProperties(ToggleButtonViewModel.prototype,{command:{get:function(){return this._command}}});export default ToggleButtonViewModel;
\ No newline at end of file
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