UNPKG

4.03 kBJavaScriptView Raw
1var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
3var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
4
5function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
7function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
8
9function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
10
11// Copyright (c) 2017 Uber Technologies, Inc.
12//
13// Permission is hereby granted, free of charge, to any person obtaining a copy
14// of this software and associated documentation files (the "Software"), to deal
15// in the Software without restriction, including without limitation the rights
16// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17// copies of the Software, and to permit persons to whom the Software is
18// furnished to do so, subject to the following conditions:
19//
20// The above copyright notice and this permission notice shall be included in
21// all copies or substantial portions of the Software.
22//
23// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29// THE SOFTWARE.
30
31import AbstractSeries from './abstract-series';
32import MarkSeriesCanvas from './mark-series-canvas';
33import LineSeriesCanvas from './line-series-canvas';
34
35var LineMarkSeriesCanvas = function (_AbstractSeries) {
36 _inherits(LineMarkSeriesCanvas, _AbstractSeries);
37
38 function LineMarkSeriesCanvas() {
39 _classCallCheck(this, LineMarkSeriesCanvas);
40
41 return _possibleConstructorReturn(this, (LineMarkSeriesCanvas.__proto__ || Object.getPrototypeOf(LineMarkSeriesCanvas)).apply(this, arguments));
42 }
43
44 _createClass(LineMarkSeriesCanvas, [{
45 key: 'render',
46 value: function render() {
47 return null;
48 }
49 }], [{
50 key: 'renderLayer',
51 value: function renderLayer(props, ctx) {
52 LineSeriesCanvas.renderLayer(props, ctx);
53 MarkSeriesCanvas.renderLayer(props, ctx);
54 }
55 }, {
56 key: 'requiresSVG',
57 get: function get() {
58 return false;
59 }
60 }, {
61 key: 'isCanvas',
62 get: function get() {
63 return true;
64 }
65 }]);
66
67 return LineMarkSeriesCanvas;
68}(AbstractSeries);
69
70LineMarkSeriesCanvas.displayName = 'LineMarkSeriesCanvas';
71LineMarkSeriesCanvas.propTypes = _extends({}, AbstractSeries.propTypes);
72
73export default LineMarkSeriesCanvas;
\No newline at end of file