- Added a new option to set a CSS class to
IsometricCircle
,IsometricPath
,IsometricPentagram
,IsometricRectangle
,IsometricStarPolygon
andIsometricText
- Fix a bug related to animations not taken into account of some of the values were
0
- Add an optional
id
property to all the elements. If theid
is not specified as a property of an instance, a randomid
is generated. - Implement new methods in container classes (as
IsometricCanvas
andIsometricGroup
):getChildByIndex
method to return a child taking into account its indexgetChildById
method to return a child taking into account its idremoveChildById
method to remove a child taking into account its id
- Create a new class to create star polygons (
IsometricStarPolygon
) - Refactor the
IsometricPentagram
class to extends from theIsometricStarPolygon
with fixed points as5
and density as2
- Create a new class to work with pentagrams (star polygons)
- Fix ESM types
- Fix a getter with a different type from the setter
- Solve an error in Node environments related to
ReferenceError: SVGSVGElement is not defined
- Create a new class to work with texts (
IsometricText
)
- Capture drag events and possibility of preventing the the drag event modifies the coordinates of the element using
preventDefault
ondrag
event
- Restore the
dist/web/isometric.js
file that was ignored in gitignore by a mistake - Restore the
demo7
index file that was ignored in gitignore by a mistake
- Implement automatic dragging functionality in
IsometricShape
(therefore inIsometricRectangle
andIsometricCircle
) andIsometricGroup
classes - Refactor the project to implement position functionality using mixins, removing code duplication
- Add new methods to the
IsometricContainer
class to modify children indexes removeChild
andremoveChildren
methods of theIsometricContainer
class now throws an error if a child that is not a container‘s child is provided
- Create a new class to group elements and move them together (
IsometricGroup
) - The abstract class
IsometricGraphic
has been renamed toIsometricElement
- A new abstract class has been created (
IsometricContainer
). At the moment,IsometricCanvas
andIsometricGroup
extend from it
- Bundle the types of the package in a single file
- Add a triple-slash reference directive at the beginning of the bundles to enable types in Deno
- Added a property to close automatically or not the
IsometricPath
- Removed comments from the bundles
- Added support for textures
- Solve a bug in the IsometricRectangle drawing commands
- Added compatibility with Node environments using
jsdom
- The container property of the
IsometricCanvas
class has been moved into theprops
and if it is a string it represents a selector instead of an id - Added a new method
getSVGCode
to theIsometricCanvas
class to return the HTML code of the SVG element - Addded bundles for ESM modules
- The IsometricCanvas element parameter could be a HTMLElement or an id representing the id of the element
- Updated packages and solved vulnerabilities
- Fix a bug that was impeding negative numbers in drawing commands
- Added animation support
- Removed the superfluous Graphic class
- Created a new IsometricCircle class to build isometric circles
- Fix data sharing among multiple class instances due to shared global data
- Improved curves generation using ellipsis arcs instead of bézier curves
- Created a new IsometricRectangle class to build isometric rectangles
- Exposed some types
- Some code refactoring
- Refactored the IsometricPath class to extend from an abstract class
- Fixed a bug that was not returning the IsometricPath class instance for the clear and update methods
- Implemented a clear method in the IsometricCanvas class
- Implemented a new method and a path command to draw curves
- Added a new demo using curves
- Added more tests to test curves
- Changed the drawing commands to be space-separated instead of comma-separated
- Improved the readability of the regular expression for the commands
- Fixed a bug in the
draw
that was not returning theIsometricPath
instance
- Create new tests
- Increase the test coverage
- During the creation of the new tests, some bugs were detected and fixed:
- strokeDasharray property was fixed using the correct name: strokeDashArray
- The dash-array property was changed from comma separated numbers to space separated numbers
- Fixed a bug in the width get property of the IsometricCanvas class
- Fix a bug in the removeEventListener methods that were not removing the events
- IsometricCanvas and IsometricPath are now exposed directly in the module instead of exporting them inside an object
- Rename some methods of the IsometricCanvas class to make them more extensible:
- addPath to addChild
- addPaths to addChildren
- removePath to removeChild
- removePathByIndex to removeChildByIndex
- Added new methods to the IsometricCanvas class:
- getElement: return the native SVG element
- removeChildren: remove all the children of the IsometricCanvas
- Renamed a method of the IsometricPath class:
- getPath to getElement
- Added more tests
- Return the class instance in the methods addEventListener and removeEventListener of the IsometricCanvas and IsometricPath classes
- Add two new methods to the IsometricCanvas class to add and remove event listeners
- Add two new methods to the IsometricPath class to add and remove event listeners
- Modified the first demo example to show the usage of the new methods
- IsometricCanvas setter properties now change the SVG element
- IsometricPath setter properties now change the SVG path element
- New methods in the IsometricCanvas class (removePath, removePathByIndex, and clear)
- Fix a bug in the IsometricPath class about missing strokeOpacity property
- Refactored how to share the canvas properties among shapes using a global class
- Removed some internal public methods from the IsometricPath class
- Created a new method in the Isometric path to draw using string commands
- Created a new demo using the new method
- New logo
- Created the isometric library