Skip to content

Commit

Permalink
v1.1.1 (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
IcculusC authored Oct 29, 2018
1 parent 8d1ab70 commit 82a76fd
Show file tree
Hide file tree
Showing 22 changed files with 437 additions and 509 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"value":{"success":true,"data":{"latest":{"version":"3.4.11","info":{"plain":"If you see this message in your terminal, please open a GitHub issue"}}},"time":1540694115528},"type":"Object"}
{"value":{"success":true,"data":{"latest":{"version":"3.4.11","info":{"plain":"If you see this message in your terminal, please open a GitHub issue"}}},"time":1540781457607},"type":"Object"}
2 changes: 1 addition & 1 deletion docs/iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@
console.warn('unable to connect to parent frame for connecting dev tools');
}</script></head><body><div class="sb-nopreview sb-wrapper"><div class="sb-nopreview_main"><h1 class="sb-nopreview_heading sb-heading">No Preview</h1><p>Sorry, but you either have no stories or none are selected somehow.</p><ul><li>Please check the storybook config.</li><li>Try reloading the page.</li></ul></div></div><div class="sb-errordisplay sb-wrapper"><div id="error-message" class="sb-heading"></div><pre class="sb-errordisplay_code">
<code id="error-stack"></code>
</pre></div><div id="root"></div><script src="static/runtime~iframe.36305751f78a2d599ec4.bundle.js"></script><script src="static/vendors~iframe.f00c107713ee0d9ff806.bundle.js"></script><script src="static/iframe.2bb151056c0ecda82ce7.bundle.js"></script></body></html>
</pre></div><div id="root"></div><script src="static/runtime~iframe.36305751f78a2d599ec4.bundle.js"></script><script src="static/vendors~iframe.577a04055dd70033dcc8.bundle.js"></script><script src="static/iframe.08d38310b810ebd3cb63.bundle.js"></script></body></html>
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
}
} catch (e) {
console.warn('unable to connect to parent frame for connecting dev tools');
}</script></head><body><div id="root"></div><script src="static/runtime~manager.9ffd8dd7b8642e4235e2.bundle.js"></script><script src="static/manager.46359717fed1977d205c.bundle.js"></script></body></html>
}</script></head><body><div id="root"></div><script src="static/runtime~manager.9ffd8dd7b8642e4235e2.bundle.js"></script><script src="static/manager.3ff3a93aa2ad90452604.bundle.js"></script></body></html>
2 changes: 2 additions & 0 deletions docs/static/iframe.08d38310b810ebd3cb63.bundle.js

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions docs/static/iframe.2bb151056c0ecda82ce7.bundle.js

This file was deleted.

106 changes: 106 additions & 0 deletions docs/static/manager.3ff3a93aa2ad90452604.bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/manager.3ff3a93aa2ad90452604.bundle.js.map

Large diffs are not rendered by default.

106 changes: 0 additions & 106 deletions docs/static/manager.46359717fed1977d205c.bundle.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/static/manager.46359717fed1977d205c.bundle.js.map

This file was deleted.

78 changes: 78 additions & 0 deletions docs/static/vendors~iframe.577a04055dd70033dcc8.bundle.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

78 changes: 0 additions & 78 deletions docs/static/vendors~iframe.f00c107713ee0d9ff806.bundle.js

This file was deleted.

This file was deleted.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-hex-engine",
"description": "Hexagon Map Editor and Game Engine",
"version": "1.1.0",
"version": "1.1.1",
"main": "lib/index.js",
"author": "IcculusC",
"repository": "IcculusC/react-hex-engine",
Expand Down Expand Up @@ -29,6 +29,7 @@
"@babel/runtime": "^7.1.2",
"@storybook/addon-centered": "^3.4.11",
"@storybook/addon-knobs": "^4.0.0-rc.6",
"@storybook/addon-info": "^4.0.0-rc.6",
"@storybook/addon-notes": "^4.0.0-rc.6",
"@storybook/addon-options": "^4.0.0-rc.6",
"@storybook/addon-storysource": "^4.0.0-rc.6",
Expand All @@ -52,13 +53,13 @@
"jest": "^23.6.0",
"jest-html-reporter": "^2.4.2",
"prettier": "^1.14.3",
"react": "^16.5.2",
"react-dom": "^16.5.2",
"react-test-renderer": "^16.5.2",
"prop-types": "^15.5.7-alpha.1",
"react": "^16.7.0-alpha.0",
"react-dom": "^16.7.0-alpha.0",
"react-test-renderer": "^16.7.0-alpha.0",
"style-loader": "^0.23.1"
},
"dependencies": {
"@storybook/addon-info": "^4.0.0-rc.6",
"classnames": "^2.2.5",
"memoize-one": "^4.0.2"
},
Expand Down
20 changes: 16 additions & 4 deletions src/HexEngine.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import React, { useEffect, useState } from "react";
import PropTypes from "prop-types";
import classNames from "classnames";
import { HexEngineProvider } from "./Context";
Expand Down Expand Up @@ -32,9 +32,21 @@ const HexEngine = props => {
} = props;

const orientation = flat ? Orientation.Flat : Orientation.Pointy;
const points = calculateCoordinates(orientation, size)
.map(point => point.toString())
.join(" ");
const [points, setPoints] = useState(
calculateCoordinates(orientation, size)
.map(point => point.toString())
.join(" ")
);
useEffect(
() => {
setPoints(() =>
calculateCoordinates(orientation, size)
.map(point => point.toString())
.join(" ")
);
},
[orientation, size]
);
const layout = { orientation, origin, size, spacing };

return (
Expand Down
Loading

0 comments on commit 82a76fd

Please sign in to comment.