提交 7e527b45 编写于 作者: P pissang

Workaround on build bug of rollup0.51.

上级 376b7420
......@@ -28,14 +28,12 @@ function Scale(setting) {
this.init && this.init.apply(this, arguments);
}
var scaleProto = Scale.prototype;
/**
* Parse input val to valid inner number.
* @param {*} val
* @return {number}
*/
scaleProto.parse = function (val) {
Scale.prototype.parse = function (val) {
// Notice: This would be a trap here, If the implementation
// of this method depends on extent, and this method is used
// before extent set (like in dataZoom), it would be wrong.
......@@ -43,11 +41,11 @@ scaleProto.parse = function (val) {
return val;
};
scaleProto.getSetting = function (name) {
Scale.prototype.getSetting = function (name) {
return this._setting[name];
};
scaleProto.contain = function (val) {
Scale.prototype.contain = function (val) {
var extent = this._extent;
return val >= extent[0] && val <= extent[1];
};
......@@ -57,7 +55,7 @@ scaleProto.contain = function (val) {
* @param {number} val
* @return {number}
*/
scaleProto.normalize = function (val) {
Scale.prototype.normalize = function (val) {
var extent = this._extent;
if (extent[1] === extent[0]) {
return 0.5;
......@@ -70,7 +68,7 @@ scaleProto.normalize = function (val) {
* @param {number} val
* @return {number}
*/
scaleProto.scale = function (val) {
Scale.prototype.scale = function (val) {
var extent = this._extent;
return val * (extent[1] - extent[0]) + extent[0];
};
......@@ -79,7 +77,7 @@ scaleProto.scale = function (val) {
* Set extent from data
* @param {Array.<number>} other
*/
scaleProto.unionExtent = function (other) {
Scale.prototype.unionExtent = function (other) {
var extent = this._extent;
other[0] < extent[0] && (extent[0] = other[0]);
other[1] > extent[1] && (extent[1] = other[1]);
......@@ -92,7 +90,7 @@ scaleProto.unionExtent = function (other) {
* @param {module:echarts/data/List} data
* @param {string} dim
*/
scaleProto.unionExtentFromData = function (data, dim) {
Scale.prototype.unionExtentFromData = function (data, dim) {
this.unionExtent(data.getDataExtent(dim, true));
};
......@@ -100,7 +98,7 @@ scaleProto.unionExtentFromData = function (data, dim) {
* Get extent
* @return {Array.<number>}
*/
scaleProto.getExtent = function () {
Scale.prototype.getExtent = function () {
return this._extent.slice();
};
......@@ -109,7 +107,7 @@ scaleProto.getExtent = function () {
* @param {number} start
* @param {number} end
*/
scaleProto.setExtent = function (start, end) {
Scale.prototype.setExtent = function (start, end) {
var thisExtent = this._extent;
if (!isNaN(start)) {
thisExtent[0] = start;
......@@ -122,7 +120,7 @@ scaleProto.setExtent = function (start, end) {
/**
* @return {Array.<string>}
*/
scaleProto.getTicksLabels = function () {
Scale.prototype.getTicksLabels = function () {
var labels = [];
var ticks = this.getTicks();
for (var i = 0; i < ticks.length; i++) {
......@@ -135,7 +133,7 @@ scaleProto.getTicksLabels = function () {
* When axis extent depends on data and no data exists,
* axis ticks should not be drawn, which is named 'blank'.
*/
scaleProto.isBlank = function () {
Scale.prototype.isBlank = function () {
return this._isBlank;
},
......@@ -143,7 +141,7 @@ scaleProto.isBlank = function () {
* When axis extent depends on data and no data exists,
* axis ticks should not be drawn, which is named 'blank'.
*/
scaleProto.setBlank = function (isBlank) {
Scale.prototype.setBlank = function (isBlank) {
this._isBlank = isBlank;
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册