kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
67 lines (58 loc) • 7.08 kB
JavaScript
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _timeRangeSlider = _interopRequireDefault(require("../common/time-range-slider"));
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
/*
* TimeRangeFilter -> TimeRangeSlider -> RangeSlider
*/
TimeRangeFilterFactory.deps = [_timeRangeSlider["default"]];
function TimeRangeFilterFactory(TimeRangeSlider) {
var TimeRangeFilter = function TimeRangeFilter(_ref) {
var filter = _ref.filter,
setFilter = _ref.setFilter,
isAnimatable = _ref.isAnimatable,
toggleAnimation = _ref.toggleAnimation,
hideTimeTitle = _ref.hideTimeTitle;
return _react["default"].createElement(TimeRangeSlider, {
domain: filter.domain,
value: filter.value,
plotType: filter.plotType,
lineChart: filter.lineChart,
step: filter.step,
speed: filter.speed,
histogram: filter.enlarged ? filter.enlargedHistogram : filter.histogram,
onChange: setFilter,
toggleAnimation: toggleAnimation,
isAnimatable: isAnimatable,
isEnlarged: filter.enlarged,
hideTimeTitle: hideTimeTitle
});
};
return TimeRangeFilter;
}
var _default = TimeRangeFilterFactory;
exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL2ZpbHRlcnMvdGltZS1yYW5nZS1maWx0ZXIuanMiXSwibmFtZXMiOlsiVGltZVJhbmdlRmlsdGVyRmFjdG9yeSIsImRlcHMiLCJUaW1lUmFuZ2VTbGlkZXJGYWN0b3J5IiwiVGltZVJhbmdlU2xpZGVyIiwiVGltZVJhbmdlRmlsdGVyIiwiZmlsdGVyIiwic2V0RmlsdGVyIiwiaXNBbmltYXRhYmxlIiwidG9nZ2xlQW5pbWF0aW9uIiwiaGlkZVRpbWVUaXRsZSIsImRvbWFpbiIsInZhbHVlIiwicGxvdFR5cGUiLCJsaW5lQ2hhcnQiLCJzdGVwIiwic3BlZWQiLCJlbmxhcmdlZCIsImVubGFyZ2VkSGlzdG9ncmFtIiwiaGlzdG9ncmFtIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFvQkE7O0FBQ0E7O0FBckJBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUtBOzs7QUFJQUEsc0JBQXNCLENBQUNDLElBQXZCLEdBQThCLENBQUNDLDJCQUFELENBQTlCOztBQUVBLFNBQVNGLHNCQUFULENBQWdDRyxlQUFoQyxFQUFpRDtBQUMvQyxNQUFNQyxlQUFlLEdBQUcsU0FBbEJBLGVBQWtCO0FBQUEsUUFBRUMsTUFBRixRQUFFQSxNQUFGO0FBQUEsUUFBV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