UNPKG

@antv/g2plot

Version:

G2 Plot, a market of plots built with the Grammar of Graphics'

35 lines 1.17 kB
import { __extends } from "tslib"; import * as _ from '@antv/util'; import BasePlot from '../../base/plot'; import LiquidLayer from './layer'; var Liquid = /** @class */ (function (_super) { __extends(Liquid, _super); function Liquid() { return _super !== null && _super.apply(this, arguments) || this; } Liquid.prototype.createLayers = function (props) { var layerProps = _.deepMix({}, props); layerProps.type = 'liquid'; _super.prototype.createLayers.call(this, layerProps); }; Liquid.prototype.changeValue = function (value, all) { if (all === void 0) { all = false; } if (all) { this.eachLayer(function (layer) { if (layer instanceof LiquidLayer) { layer.changeValue(value); } }); } else { var layer = this.layers[0]; if (layer instanceof LiquidLayer) { layer.changeValue(value); } } }; Liquid.getDefaultOptions = LiquidLayer.getDefaultOptions; return Liquid; }(BasePlot)); export default Liquid; //# sourceMappingURL=index.js.map