web3dlink 2.1.3 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/web3dlink.js CHANGED
@@ -1259,13 +1259,22 @@ function validateLodConfig(e, t) {
1259
1259
  });
1260
1260
  }
1261
1261
  function validateHtmlMarkerConfig(e, t) {
1262
- t.push(...validateOptionalNumber({
1262
+ if (t.push(...validateOptionalNumber({
1263
1263
  normalized: e,
1264
1264
  field: "scale",
1265
1265
  value: e.scale,
1266
1266
  defaultValue: 1,
1267
1267
  min: 0
1268
- })), t.push(...validateOptionalString({
1268
+ })), t.push(...validateOptionalArray({
1269
+ normalized: e,
1270
+ field: "size",
1271
+ value: normalizeEmptyArray(e.size),
1272
+ length: 2
1273
+ })), Array.isArray(e.size) && e.size.length === 2) {
1274
+ let [n, r] = e.size;
1275
+ (typeof n != "number" || Number.isNaN(n) || n <= 0) && t.push("[size[0]]必须是>0的数字"), (typeof r != "number" || Number.isNaN(r) || r <= 0) && t.push("[size[1]]必须是>0的数字");
1276
+ }
1277
+ t.push(...validateOptionalString({
1269
1278
  normalized: e,
1270
1279
  field: "content",
1271
1280
  value: e.content,
@@ -1640,6 +1649,27 @@ function validatePopupCustom1Config(e, t) {
1640
1649
  }
1641
1650
  //#endregion
1642
1651
  //#region ../api/marker/validate.js
1652
+ var MARKER_TYPE_LIST = [
1653
+ "default",
1654
+ "default1",
1655
+ "default2",
1656
+ "default3",
1657
+ "flashIcon",
1658
+ "component",
1659
+ "customCom",
1660
+ "menuIcon",
1661
+ "flood",
1662
+ "capture",
1663
+ "anchor1",
1664
+ "anchor2",
1665
+ "anchor3",
1666
+ "anchor4",
1667
+ "anchor5",
1668
+ "anchor6",
1669
+ "html",
1670
+ "url",
1671
+ "lod"
1672
+ ];
1643
1673
  function iconMarker(e) {
1644
1674
  let t = [], n = { ...e };
1645
1675
  if (e.id === void 0 || e.id === null || e.id === "" ? n.id = generateUniqueId$1() : n.id = e.id, t.push(...validateCoordinatesRequired(e.coordinates)), t.push(...validateOptionalString({
@@ -1665,27 +1695,7 @@ function iconMarker(e) {
1665
1695
  value: e.markerType,
1666
1696
  defaultValue: "default",
1667
1697
  type: "string",
1668
- list: [
1669
- "default",
1670
- "default1",
1671
- "default2",
1672
- "default3",
1673
- "lod",
1674
- "flashIcon",
1675
- "component",
1676
- "customCom",
1677
- "menuIcon",
1678
- "flood",
1679
- "capture",
1680
- "anchor1",
1681
- "anchor2",
1682
- "anchor3",
1683
- "anchor4",
1684
- "anchor5",
1685
- "anchor6",
1686
- "html",
1687
- "url"
1688
- ]
1698
+ list: MARKER_TYPE_LIST
1689
1699
  })), e.recordData !== void 0) {
1690
1700
  let r = e.recordData;
1691
1701
  if (typeof r != "object" || !r || Array.isArray(r)) t.push({
@@ -1735,27 +1745,7 @@ function followMarker(e) {
1735
1745
  value: e.markerType,
1736
1746
  defaultValue: "default",
1737
1747
  type: "string",
1738
- list: [
1739
- "default",
1740
- "default1",
1741
- "default2",
1742
- "default3",
1743
- "lod",
1744
- "flashIcon",
1745
- "component",
1746
- "customCom",
1747
- "menuIcon",
1748
- "flood",
1749
- "capture",
1750
- "anchor1",
1751
- "anchor2",
1752
- "anchor3",
1753
- "anchor4",
1754
- "anchor5",
1755
- "anchor6",
1756
- "html",
1757
- "url"
1758
- ]
1748
+ list: MARKER_TYPE_LIST
1759
1749
  })), e.recordData !== void 0) {
1760
1750
  let r = e.recordData;
1761
1751
  if (typeof r != "object" || !r || Array.isArray(r)) t.push({