react-zdog
Advanced tools
Comparing version 1.0.10 to 1.0.11
@@ -116,3 +116,4 @@ 'use strict'; | ||
Element = _ref2$element === void 0 ? 'svg' : _ref2$element, | ||
rest = _objectWithoutPropertiesLoose(_ref2, ["children", "style", "resize", "element"]); | ||
dragRotate = _ref2.dragRotate, | ||
rest = _objectWithoutPropertiesLoose(_ref2, ["children", "style", "resize", "element", "dragRotate"]); | ||
@@ -149,3 +150,4 @@ var canvas = React.useRef(); | ||
state.current.illu = new Zdog.Illustration(_extends({ | ||
element: canvas.current | ||
element: canvas.current, | ||
dragRotate: dragRotate | ||
}, rest)); | ||
@@ -152,0 +154,0 @@ state.current.illu.addChild(scene); |
@@ -97,3 +97,4 @@ import _extends from '@babel/runtime/helpers/esm/extends'; | ||
Element = _ref2$element === void 0 ? 'svg' : _ref2$element, | ||
rest = _objectWithoutPropertiesLoose(_ref2, ["children", "style", "resize", "element"]); | ||
dragRotate = _ref2.dragRotate, | ||
rest = _objectWithoutPropertiesLoose(_ref2, ["children", "style", "resize", "element", "dragRotate"]); | ||
@@ -126,3 +127,4 @@ const canvas = useRef(); | ||
state.current.illu = new Zdog.Illustration(_extends({ | ||
element: canvas.current | ||
element: canvas.current, | ||
dragRotate | ||
}, rest)); | ||
@@ -129,0 +131,0 @@ state.current.illu.addChild(scene); |
@@ -69,3 +69,3 @@ import Zdog from 'zdog' | ||
const Illustration = React.memo(({ children, style, resize, element: Element = 'svg', ...rest }) => { | ||
const Illustration = React.memo(({ children, style, resize, element: Element = 'svg', dragRotate, ...rest }) => { | ||
const canvas = useRef() | ||
@@ -92,3 +92,3 @@ const [bind, size] = useMeasure() | ||
useEffect(() => { | ||
state.current.illu = new Zdog.Illustration({ element: canvas.current, ...rest }) | ||
state.current.illu = new Zdog.Illustration({ element: canvas.current, dragRotate, ...rest }) | ||
state.current.illu.addChild(scene) | ||
@@ -95,0 +95,0 @@ state.current.illu.updateGraph() |
{ | ||
"name": "react-zdog", | ||
"version": "1.0.10", | ||
"version": "1.0.11", | ||
"description": "React-fiber renderer for zdog", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js", |
25257
608