mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-23 04:25:21 +08:00
# Conflicts: # jsowell-ui/.env.development # jsowell-ui/.env.staging # jsowell-ui/bin/build-sit.bat # jsowell-ui/bin/build.bat # jsowell-ui/src/api/adapayMember/adapayMember.js # jsowell-ui/src/api/pile/merchant.js # jsowell-ui/src/router/index.js # jsowell-ui/src/views/financial/financeDetail.vue # jsowell-ui/src/views/financial/merchant.vue # jsowell-ui/src/views/homeIndex/homeIndex.vue # jsowell-ui/src/views/login.vue # jsowell-ui/src/views/pile/basic/detail.vue # jsowell-ui/src/views/pile/station/components/SiteInfo.vue # jsowell-ui/src/views/pile/station/detail.vue # jsowell-ui/src/views/pile/station/orderReport.vue
34 lines
994 B
JavaScript
34 lines
994 B
JavaScript
var zrUtil = require("../core/util");
|
|
|
|
var Gradient = require("./Gradient");
|
|
|
|
/**
|
|
* x, y, x2, y2 are all percent from 0 to 1
|
|
* @param {number} [x=0]
|
|
* @param {number} [y=0]
|
|
* @param {number} [x2=1]
|
|
* @param {number} [y2=0]
|
|
* @param {Array.<Object>} colorStops
|
|
* @param {boolean} [globalCoord=false]
|
|
*/
|
|
var LinearGradient = function (x, y, x2, y2, colorStops, globalCoord) {
|
|
// Should do nothing more in this constructor. Because gradient can be
|
|
// declard by `color: {type: 'linear', colorStops: ...}`, where
|
|
// this constructor will not be called.
|
|
this.x = x == null ? 0 : x;
|
|
this.y = y == null ? 0 : y;
|
|
this.x2 = x2 == null ? 1 : x2;
|
|
this.y2 = y2 == null ? 0 : y2; // Can be cloned
|
|
|
|
this.type = 'linear'; // If use global coord
|
|
|
|
this.global = globalCoord || false;
|
|
Gradient.call(this, colorStops);
|
|
};
|
|
|
|
LinearGradient.prototype = {
|
|
constructor: LinearGradient
|
|
};
|
|
zrUtil.inherits(LinearGradient, Gradient);
|
|
var _default = LinearGradient;
|
|
module.exports = _default; |