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

@noriginmedia/react-spatial-navigation

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@noriginmedia/react-spatial-navigation - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

6

dist/spatialNavigation.js

@@ -116,4 +116,8 @@ 'use strict';

var totalDistancePoints = primaryAxisDistance * MAIN_COORDINATE_WEIGHT + secondaryAxisDistance;
var priority = totalDistancePoints / (isAdjacentSlice ? ADJACENT_SLICE_WEIGHT : DIAGONAL_SLICE_WEIGHT);
/**
* + 1 here is in case of distance is zero, but we still want to apply Adjacent priority weight
*/
var priority = (totalDistancePoints + 1) / (isAdjacentSlice ? ADJACENT_SLICE_WEIGHT : DIAGONAL_SLICE_WEIGHT);
_this.log('smartNavigate', 'distance (primary, secondary, total weighted) for ' + sibling.focusKey + ' relative to ' + focusKey + ' is', primaryAxisDistance, secondaryAxisDistance, totalDistancePoints);

@@ -120,0 +124,0 @@

2

package.json
{
"name": "@noriginmedia/react-spatial-navigation",
"version": "2.2.0",
"version": "2.2.1",
"description": "HOC-based Spatial Navigation (key navigation) solution for React",

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

@@ -233,4 +233,8 @@ import filter from 'lodash/filter';

const totalDistancePoints = (primaryAxisDistance * MAIN_COORDINATE_WEIGHT) + secondaryAxisDistance;
const priority = totalDistancePoints / (isAdjacentSlice ? ADJACENT_SLICE_WEIGHT : DIAGONAL_SLICE_WEIGHT);
/**
* + 1 here is in case of distance is zero, but we still want to apply Adjacent priority weight
*/
const priority = (totalDistancePoints + 1) / (isAdjacentSlice ? ADJACENT_SLICE_WEIGHT : DIAGONAL_SLICE_WEIGHT);
this.log(

@@ -237,0 +241,0 @@ 'smartNavigate',

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