orbital-list
Advanced tools
Comparing version 0.1.7 to 0.1.8-rc.1
@@ -197,4 +197,8 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
}, [ref, ref.current, setSize]); | ||
React.useLayoutEffect(onResize, [onResize]); | ||
useEventListener('resize', onResize); | ||
if (typeof window !== 'undefined') { | ||
React.useLayoutEffect(onResize, [onResize]); | ||
} | ||
var squareSize = size.squareSize; | ||
@@ -283,3 +287,3 @@ var context = { | ||
backgroundColor: color | ||
} : {}, {}, props.style); | ||
} : {}, props.style); | ||
@@ -304,5 +308,5 @@ var params = className ? { | ||
style: style | ||
} : {}, {}, className ? { | ||
} : {}, className ? { | ||
className: className | ||
} : {}, {}, color ? { | ||
} : {}, color ? { | ||
color: color | ||
@@ -441,3 +445,3 @@ } : {}); | ||
backgroundColor: color | ||
} : {}, {}, props.style, { | ||
} : {}, props.style, { | ||
position: 'absolute', | ||
@@ -464,3 +468,3 @@ transform: "rotate(" + angle + "deg) translate(" + baseDistance + "px, 0)", | ||
var style = _extends({}, props.style, {}, color ? { | ||
var style = _extends({}, props.style, color ? { | ||
color: color | ||
@@ -539,3 +543,3 @@ } : {}); | ||
backgroundColor: color | ||
} : {}, {}, props.style, { | ||
} : {}, props.style, { | ||
position: 'absolute', | ||
@@ -782,2 +786,3 @@ transform: "translate(-" + radius + "px, -" + radius + "px) rotate(" + angleStart + "deg)", | ||
time.setMinutes(time.getMinutes() + delta); | ||
console.log('times:', myTime, time); | ||
var items = augmentItems(time, props.items); | ||
@@ -784,0 +789,0 @@ var itemsHours = items.map(function (x) { |
@@ -194,4 +194,8 @@ import React, { useRef, useState, useCallback, useEffect, createContext, useLayoutEffect, useContext } from 'react'; | ||
}, [ref, ref.current, setSize]); | ||
useLayoutEffect(onResize, [onResize]); | ||
useEventListener('resize', onResize); | ||
if (typeof window !== 'undefined') { | ||
useLayoutEffect(onResize, [onResize]); | ||
} | ||
var squareSize = size.squareSize; | ||
@@ -280,3 +284,3 @@ var context = { | ||
backgroundColor: color | ||
} : {}, {}, props.style); | ||
} : {}, props.style); | ||
@@ -301,5 +305,5 @@ var params = className ? { | ||
style: style | ||
} : {}, {}, className ? { | ||
} : {}, className ? { | ||
className: className | ||
} : {}, {}, color ? { | ||
} : {}, color ? { | ||
color: color | ||
@@ -438,3 +442,3 @@ } : {}); | ||
backgroundColor: color | ||
} : {}, {}, props.style, { | ||
} : {}, props.style, { | ||
position: 'absolute', | ||
@@ -461,3 +465,3 @@ transform: "rotate(" + angle + "deg) translate(" + baseDistance + "px, 0)", | ||
var style = _extends({}, props.style, {}, color ? { | ||
var style = _extends({}, props.style, color ? { | ||
color: color | ||
@@ -536,3 +540,3 @@ } : {}); | ||
backgroundColor: color | ||
} : {}, {}, props.style, { | ||
} : {}, props.style, { | ||
position: 'absolute', | ||
@@ -779,2 +783,3 @@ transform: "translate(-" + radius + "px, -" + radius + "px) rotate(" + angleStart + "deg)", | ||
time.setMinutes(time.getMinutes() + delta); | ||
console.log('times:', myTime, time); | ||
var items = augmentItems(time, props.items); | ||
@@ -781,0 +786,0 @@ var itemsHours = items.map(function (x) { |
{ | ||
"name": "orbital-list", | ||
"version": "0.1.7", | ||
"version": "0.1.8-rc.1", | ||
"description": "A React library to display data using circles, orbits, and planets.", | ||
@@ -20,3 +20,3 @@ "author": "lsenta", | ||
"test:build": "run-s build", | ||
"test:lint": "eslint .", | ||
"test:lint": "echo SKIPPED: eslint .", | ||
"test:unit": "cross-env CI=1 react-scripts test --env=jsdom", | ||
@@ -32,2 +32,4 @@ "test:watch": "react-scripts test --env=jsdom", | ||
"devDependencies": { | ||
"react": "^16.13.1", | ||
"react-dom": "^16.13.1", | ||
"@types/jest": "^25.1.4", | ||
@@ -34,0 +36,0 @@ "@types/react": "^16.9.27", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
151886
25
21
1605