UNPKG

deep-viz

Version:

A React component library, provide concise and beautiful diversity charts with Canvas, SVG, E-map, WebGL, Dom, based on data visualization experience and commercial data display practice.

1 lines 1.93 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}}(),_react=require("react"),_immutable=require("immutable");function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Basic=function(){function t(e){_classCallCheck(this,t);e=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e.color=["#2CA51A","#0BBEFE","#EA6C6B","#F8B853","#8AAAF6","#4F76D1","#C1DFFF","#F7F7F7"],e.fontSize=12,e.fontColor="#999999",e.gridColor="#E9E9E9",e.emphasisColor="#108EE9",e.titleColor="#4A4A4A",e.titleSize=14,e}return _inherits(t,_react.Component),_createClass(t,[{key:"shouldComponentUpdate",value:function(){var e,t,r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=this.props||{},i=this.state||{};if(Object.keys(o).length!==Object.keys(null===r?{}:r).length||Object.keys(i).length!==Object.keys(null===n?{}:n).length)return!0;for(e in r)if(o[e]!==r[e]||!(0,_immutable.is)(o[e],r[e]))return!0;for(t in n)if(i[t]!==n[t]||!(0,_immutable.is)(i[t],n[t]))return!0;return!1}}]),t}();exports.default=Basic;