You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
2.2 KiB
8 lines
2.2 KiB
// All material copyright Esri, All Rights Reserved, unless otherwise specified. |
|
// See https://js.arcgis.com/4.30/esri/copyright.txt for details. |
|
//>>built |
|
define("../../chunks/tslib.es6 ../../core/Error ../../core/Identifiable ../../core/Loadable ../../core/Logger ../../core/MultiOriginJSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/RandomLCG ../../core/accessorSupport/decorators/reader ../../core/accessorSupport/decorators/subclass ../../core/accessorSupport/decorators/writer ./ControlPointsGeoreference ./CornersGeoreference ./ExtentAndRotationGeoreference ./GeoreferenceBase ./mediaUtils".split(" "),function(d, |
|
q,b,r,t,u,l,m,B,v,w,x,h,y,z,g,A){m={key:"type",base:g,typeMap:{"control-points":h,corners:y,"extent-and-rotation":z}};g={key:"type",base:g,typeMap:{"control-points":h}};b=class extends b.NumericIdentifiableMixin(u.MultiOriginJSONMixin(r)){constructor(a){super(a);this.georeference=null;this.opacity=1}readGeoreference(a){return h.fromJSON(a)}writeGeoreference(a,e,f,c){const n=c?.resources?.pendingOperations,p=()=>{const k=A.toControlPointsGeoreference(this.georeference,this.contentWidth,this.contentHeight); |
|
k&&("control-points"!==a.type&&t.getLogger(this).warn(`only georeference of type 'control-points' may be persisted. The georeference of type '${a.type}' has been automatically converted.`),4!==k.controlPoints?.length&&c?.messages?c.messages.push(new q("property:unsupported","only 'control-points' georeference with 4 control points may be persisted.")):e[f]=k.write({},c))};"control-points"!==a.type&&!this.loaded&&n?(e[f]={},n.push(this.load().then(p))):p()}get contentWidth(){return 0}get contentHeight(){return 0}toSource(a){const {georeference:e, |
|
contentWidth:f,contentHeight:c}=this;if(null==a||null==e||0===f||0===c)return null;a=e.toSourceNormalized(a);if(null==a)return null;a.x*=f;a.y*=c;return a}};d.__decorate([l.property({types:m,json:{write:!0,types:g}})],b.prototype,"georeference",void 0);d.__decorate([v.reader("georeference")],b.prototype,"readGeoreference",null);d.__decorate([x.writer("georeference")],b.prototype,"writeGeoreference",null);d.__decorate([l.property({json:{read:!1,write:!1}})],b.prototype,"opacity",void 0);return b=d.__decorate([w.subclass("esri.layers.support.MediaElementBase")], |
|
b)}); |