Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@easyv/utils

Package Overview
Dependencies
Maintainers
5
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@easyv/utils - npm Package Compare versions

Comparing version 0.0.22 to 0.0.23

10

lib/common/utils.js

@@ -15,2 +15,3 @@ "use strict";

exports.getYTicks = getYTicks;
exports.getYTicksByStep = getYTicksByStep;
exports.degToRad = degToRad;

@@ -147,2 +148,11 @@ exports.lglt2xyz = lglt2xyz;

function getYTicksByStep(max, min, step) {
var count = (max - min) / step;
var ticks = (0, _d3Array.range)(0, count).map(function (item) {
var value = item * step + +min;
return +(value > -1 && value < 1 && value !== 0 || step.toString().indexOf('.') > -1 ? f2(value) : f0(value));
});
return [].concat((0, _toConsumableArray2["default"])(ticks), [max]);
}
function degToRad(angle) {

@@ -149,0 +159,0 @@ return Math.PI / 180 * angle;

6

lib/shared/Grid.js

@@ -23,2 +23,4 @@ "use strict";

yCount = yConfig.count,
yStep = yConfig.step,
tickModel = yConfig.tickModel,
_yConfig$offset = yConfig.offset,

@@ -31,4 +33,5 @@ yOffset = _yConfig$offset === void 0 ? 3 : _yConfig$offset;

var yDomain = yScale.domain();
var Model = tickModel ? tickModel : 'count';
var xValues = xScale.ticks ? xScale.ticks(+xConfig.count) : xScale.domain();
var yValues = yScale.ticks ? tickAuto ? yScale.ticks(+yCount) : (0, _utils.getYTicks)(yDomain[1], yDomain[0], +yCount) : yDomain;
var yValues = yScale.ticks ? tickAuto ? yScale.ticks(+yCount) : Model === 'count' ? (0, _utils.getYTicks)(yDomain[1], yDomain[0], +yCount) : (0, _utils.getYTicksByStep)(yDomain[1], yDomain[0], +yStep) : yDomain;
var xBandwidth = xScale.bandwidth ? xScale.bandwidth() : 0;

@@ -74,3 +77,2 @@ var yBandwidth = yScale.bandwidth ? yScale.bandwidth() : 0;

;
return /*#__PURE__*/_react["default"].createElement("line", {

@@ -77,0 +79,0 @@ key: index,

@@ -33,2 +33,4 @@ "use strict";

var count = label.count,
tickModel = label.tickModel,
step = label.step,
_label$tickAuto = label.tickAuto,

@@ -43,3 +45,4 @@ tickAuto = _label$tickAuto === void 0 ? true : _label$tickAuto,

var domain = scale.domain();
var values = scale.ticks ? tickAuto ? scale.ticks(+count) : (0, _utils.getYTicks)(domain[1], domain[0], +count) : tickAuto ? domain : (0, _utils.getTicksOfAxis)(domain, +count);
var Model = tickModel ? tickModel : 'count';
var values = scale.ticks ? tickAuto ? scale.ticks(+count) : Model === 'count' ? (0, _utils.getYTicks)(domain[1], domain[0], +count) : (0, _utils.getYTicksByStep)(domain[1], domain[0], +step) : tickAuto ? domain : (0, _utils.getTicksOfAxis)(domain, +count);
var height = scale.range()[0];

@@ -110,6 +113,9 @@ var bandwidth = scale.bandwidth ? scale.bandwidth() : 0;

var count = label.count,
tickModel = label.tickModel,
step = label.step,
_label$tickAuto2 = label.tickAuto,
tickAuto = _label$tickAuto2 === void 0 ? true : _label$tickAuto2;
var domain = scale.domain();
var values = scale.ticks ? tickAuto ? scale.ticks(+count) : (0, _utils.getYTicks)(domain[1], domain[0], +count) : domain;
var Model = tickModel ? tickModel : 'count';
var values = scale.ticks ? tickAuto ? scale.ticks(+count) : Model === 'count' ? (0, _utils.getYTicks)(domain[1], domain[0], +count) : (0, _utils.getYTicksByStep)(domain[1], domain[0], +step) : domain;
var height = scale.range()[0];

@@ -116,0 +122,0 @@ var bandwidth = scale.bandwidth ? scale.bandwidth() : 0;

{
"name": "@easyv/utils",
"version": "0.0.22",
"version": "0.0.23",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc