Commit 2e132c88 authored by Jonathan Beckman's avatar Jonathan Beckman
Browse files

Bug fix for toSpiralHexLayout with a null or empty list

parent 4fe3102d
## [1.0.0] - 01/16/2019
## [1.0.5] - 03/01/2019
* Packagized this hex grid code that I have been using in my own projects so other projects and
packages can use it. Contains implementations for Hex via axial coordinates as well as layouts and
an algorithm to create a spiral out layout given a list.
* Bug fix for toSpiralHexLayout with a null or empty list
## [1.0.4] - 01/16/2019
* General clean up and make package available for Dart projects, not just Flutter
## [1.0.0] - 01/16/2019
* Packagized this hex grid code that I have been using in my own projects so other projects and
packages can use it. Contains implementations for Hex via axial coordinates as well as layouts and
an algorithm to create a spiral out layout given a list.
......@@ -198,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
\ No newline at end of file
limitations under the License.
......@@ -2,3 +2,15 @@
A hexagonal grid library for Dart 2 that uses axial coordinates and contains algorithms to build hex
layouts. Inspired and implemented from https://www.redblobgames.com/grids/hexagons/implementation.html
# To Publish to Pub
* Follow https://www.dartlang.org/tools/pub/publishing
--- or ---
* Make updates to code
* Update `pubspec.yaml` to the desired version number
* Update `CHANGELOG.md` with the version number and changes
* `pub publish --dry-run`
* `pub publish`
......@@ -181,6 +181,10 @@ class UIHex {
/// entry is the origin and last entry is the furthest hex from origin. Use
/// with [HexLayout] to get a pixel representation
static List<UIHex> toSpiralHexLayout(List list) {
if (list == null || list.isEmpty) {
return [];
}
Hex originHex = Hex(0, 0);
List<UIHex> hexList = [];
......
name: hexagonal_grid
description: A hexagonal grid library for Dart 2 that uses axial coordinates and contains algorithms
to build hex layouts
version: 1.0.4
version: 1.0.5
author: Jonathan Beckman <jonathantbeckman@gmail.com>
homepage: https://gitlab.com/jbeckman/hexagonal_grid
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment