@antv/l7-layers 2.17.2 → 2.17.3

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.
@@ -11,6 +11,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
11
11
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
12
  import { AttributeType, gl } from '@antv/l7-core';
13
13
  import { rgb2arr } from '@antv/l7-utils';
14
+ import { isNumber } from 'lodash';
14
15
  import BaseModel from "../../core/BaseModel";
15
16
  import { LineArcTriangulation } from "../../core/triangulation";
16
17
  // arc dash line
@@ -103,7 +104,7 @@ var ArcModel = /*#__PURE__*/function (_BaseModel) {
103
104
  return {
104
105
  u_thetaOffset: thetaOffset,
105
106
  // u_thetaOffset: 0.0,
106
- u_opacity: opacity,
107
+ u_opacity: isNumber(opacity) ? opacity : 1,
107
108
  u_textureBlend: textureBlend === 'normal' ? 0.0 : 1.0,
108
109
  segmentNumber: segmentNumber,
109
110
  u_line_type: lineStyleObj[lineType || 'solid'],
@@ -11,6 +11,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
11
11
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
12
  import { AttributeType, gl } from '@antv/l7-core';
13
13
  import { LineTriangulation, rgb2arr } from '@antv/l7-utils';
14
+ import { isNumber } from 'lodash';
14
15
  import BaseModel from "../../core/BaseModel";
15
16
  import { LinearDir, TextureBlend } from "../../core/interface";
16
17
  // import { LineTriangulation } from '../../core/triangulation';
@@ -124,7 +125,7 @@ var LineModel = /*#__PURE__*/function (_BaseModel) {
124
125
  useLinearColor = 1;
125
126
  }
126
127
  return {
127
- u_opacity: opacity,
128
+ u_opacity: isNumber(opacity) ? opacity : 1,
128
129
  u_textureBlend: textureBlend === TextureBlend.NORMAL ? 0.0 : 1.0,
129
130
  u_line_type: lineStyleObj[lineType],
130
131
  u_dash_array: dashArray,
@@ -11,6 +11,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
11
11
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
12
  import { AttributeType, gl } from '@antv/l7-core';
13
13
  import { generateColorRamp } from '@antv/l7-utils';
14
+ import { isNumber } from 'lodash';
14
15
  import BaseModel from "../../core/BaseModel";
15
16
  import { LinearDir } from "../../core/interface";
16
17
  import { LineTriangulation } from "../../core/triangulation";
@@ -68,7 +69,7 @@ var LinearLineModel = /*#__PURE__*/function (_BaseModel) {
68
69
  }
69
70
  return {
70
71
  u_linearDir: linearDir === LinearDir.VERTICAL ? 1.0 : 0.0,
71
- u_opacity: opacity,
72
+ u_opacity: isNumber(opacity) ? opacity : 1,
72
73
  // 纹理支持参数
73
74
  u_texture: this.colorTexture,
74
75
  // 贴图
@@ -9,6 +9,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
9
9
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10
10
  import { AttributeType, gl } from '@antv/l7-core';
11
11
  import { rgb2arr } from '@antv/l7-utils';
12
+ import { isNumber } from 'lodash';
12
13
  import BaseModel from "../../core/BaseModel";
13
14
  import { SimpleLineTriangulation } from "../../core/triangulation";
14
15
  /* babel-plugin-inline-import '../shaders/simple/simpleline_frag.glsl' */
@@ -45,7 +46,7 @@ var SimpleLineModel = /*#__PURE__*/function (_BaseModel) {
45
46
  useLinearColor = 1;
46
47
  }
47
48
  return {
48
- u_opacity: opacity,
49
+ u_opacity: isNumber(opacity) ? opacity : 1,
49
50
  // 渐变色支持参数
50
51
  u_linearColor: useLinearColor,
51
52
  u_sourceColor: sourceColorArr,
@@ -16,6 +16,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
16
16
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
17
  var _l7Core = require("@antv/l7-core");
18
18
  var _l7Utils = require("@antv/l7-utils");
19
+ var _lodash = require("lodash");
19
20
  var _BaseModel2 = _interopRequireDefault(require("../../core/BaseModel"));
20
21
  var _triangulation = require("../../core/triangulation");
21
22
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
@@ -110,7 +111,7 @@ var ArcModel = /*#__PURE__*/function (_BaseModel) {
110
111
  return {
111
112
  u_thetaOffset: thetaOffset,
112
113
  // u_thetaOffset: 0.0,
113
- u_opacity: opacity,
114
+ u_opacity: (0, _lodash.isNumber)(opacity) ? opacity : 1,
114
115
  u_textureBlend: textureBlend === 'normal' ? 0.0 : 1.0,
115
116
  segmentNumber: segmentNumber,
116
117
  u_line_type: lineStyleObj[lineType || 'solid'],
@@ -16,6 +16,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
16
16
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
17
  var _l7Core = require("@antv/l7-core");
18
18
  var _l7Utils = require("@antv/l7-utils");
19
+ var _lodash = require("lodash");
19
20
  var _BaseModel2 = _interopRequireDefault(require("../../core/BaseModel"));
20
21
  var _interface = require("../../core/interface");
21
22
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
@@ -131,7 +132,7 @@ var LineModel = /*#__PURE__*/function (_BaseModel) {
131
132
  useLinearColor = 1;
132
133
  }
133
134
  return {
134
- u_opacity: opacity,
135
+ u_opacity: (0, _lodash.isNumber)(opacity) ? opacity : 1,
135
136
  u_textureBlend: textureBlend === _interface.TextureBlend.NORMAL ? 0.0 : 1.0,
136
137
  u_line_type: lineStyleObj[lineType],
137
138
  u_dash_array: dashArray,
@@ -16,6 +16,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
16
16
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
17
  var _l7Core = require("@antv/l7-core");
18
18
  var _l7Utils = require("@antv/l7-utils");
19
+ var _lodash = require("lodash");
19
20
  var _BaseModel2 = _interopRequireDefault(require("../../core/BaseModel"));
20
21
  var _interface = require("../../core/interface");
21
22
  var _triangulation = require("../../core/triangulation");
@@ -75,7 +76,7 @@ var LinearLineModel = /*#__PURE__*/function (_BaseModel) {
75
76
  }
76
77
  return {
77
78
  u_linearDir: linearDir === _interface.LinearDir.VERTICAL ? 1.0 : 0.0,
78
- u_opacity: opacity,
79
+ u_opacity: (0, _lodash.isNumber)(opacity) ? opacity : 1,
79
80
  // 纹理支持参数
80
81
  u_texture: this.colorTexture,
81
82
  // 贴图
@@ -14,6 +14,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
14
14
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
15
15
  var _l7Core = require("@antv/l7-core");
16
16
  var _l7Utils = require("@antv/l7-utils");
17
+ var _lodash = require("lodash");
17
18
  var _BaseModel2 = _interopRequireDefault(require("../../core/BaseModel"));
18
19
  var _triangulation = require("../../core/triangulation");
19
20
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
@@ -52,7 +53,7 @@ var SimpleLineModel = /*#__PURE__*/function (_BaseModel) {
52
53
  useLinearColor = 1;
53
54
  }
54
55
  return {
55
- u_opacity: opacity,
56
+ u_opacity: (0, _lodash.isNumber)(opacity) ? opacity : 1,
56
57
  // 渐变色支持参数
57
58
  u_linearColor: useLinearColor,
58
59
  u_sourceColor: sourceColorArr,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/l7-layers",
3
- "version": "2.17.2",
3
+ "version": "2.17.3",
4
4
  "description": "L7's collection of built-in layers",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -27,10 +27,10 @@
27
27
  "license": "ISC",
28
28
  "dependencies": {
29
29
  "@antv/async-hook": "^2.2.9",
30
- "@antv/l7-core": "2.17.2",
31
- "@antv/l7-maps": "2.17.2",
32
- "@antv/l7-source": "2.17.2",
33
- "@antv/l7-utils": "2.17.2",
30
+ "@antv/l7-core": "2.17.3",
31
+ "@antv/l7-maps": "2.17.3",
32
+ "@antv/l7-source": "2.17.3",
33
+ "@antv/l7-utils": "2.17.3",
34
34
  "@babel/runtime": "^7.7.7",
35
35
  "@mapbox/martini": "^0.2.0",
36
36
  "@turf/clone": "^6.5.0",
@@ -53,7 +53,7 @@
53
53
  "reflect-metadata": "^0.1.13"
54
54
  },
55
55
  "devDependencies": {
56
- "@antv/l7-test-utils": "2.17.2",
56
+ "@antv/l7-test-utils": "2.17.3",
57
57
  "@types/d3-array": "^2.0.0",
58
58
  "@types/d3-color": "^1.2.2",
59
59
  "@types/d3-interpolate": "1.1.6",
@@ -62,7 +62,7 @@
62
62
  "@types/gl-matrix": "^2.4.5",
63
63
  "@types/lodash": "^4.14.138"
64
64
  },
65
- "gitHead": "20cccf03638dd13ef950a63aa7308edb40941c83",
65
+ "gitHead": "740ab519d12bb71130b430a5925914611c3ada18",
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  }