pikaso

Seamless, headless and fully tested HTML5 Canvas library

MIT License

Downloads
4.4K
Stars
217
Committers
4

Bot releases are visible (Hide)

pikaso - v2.8.3 Latest Release

Published by raminious 6 months ago

Changelog

pikaso - v2.8.2

Published by raminious 8 months ago

Changelog

pikaso - v2.8.1

Published by raminious 11 months ago

Changelog

pikaso - v2.8.0

Published by raminious over 1 year ago

Changelog

pikaso - v2.7.6

Published by raminious over 1 year ago

Changelog

This release includes one fix and all dependencies have been updated to their latest versions:

  • All packages have been updated and adopted with the latest versions
  • Import of missing models and drawers has been fixed #94
pikaso - v2.7.5

Published by raminious over 1 year ago

Changelog

In addition to one fix, all dependencies have been updated to their latest version in this release:

  • All packages have been updated and adopted with the latest versions
  • Fix adding shape models to Board's shapes even if selection.interactive is not enabled (61aa9221af84f19330f3448de8cf92fc668ba1b1)
pikaso - v2.7.4

Published by raminious almost 2 years ago

Changelog

pikaso - v2.7.3

Published by raminious about 2 years ago

Changelog

pikaso - v2.7.2

Published by raminious over 2 years ago

Changelog

  • Measurement Tag's position is fixed when rotating the shape (#70)
  • Inserting images in NodeJS has been fixed (#71)
pikaso - v2.7.1

Published by raminious over 2 years ago

Changelog

  • Importing Text shapes from JSON has been fixed.
pikaso - v2.7.0

Published by raminious over 2 years ago

Support NodeJs 🎉

As of version 2.7.0, NodeJs is supported. This will enable collaboration between backend and frontend sides in creating images.
Using Pikaso in a NodeJs environment is similar to using it in a browser.

npm install canvas
const { Pikaso } = require('pikaso')

const editor = new Pikaso({
  width: 800,
  height: 600
})
pikaso - v2.6.0

Published by raminious over 2 years ago

Introducing Background Size (https://github.com/pikasojs/pikaso/issues/59)

From v2.6.0, both editor.loadFromUrl and editor.loadFromFile accept a second parameter with this interface

interface BackgroundOptions {
  size: 'auto' | 'resize' | 'cover' | 'contain' | 'stretch'
  x: number
  y: number
}

The size field describes how a background image should be loaded in the canvas. The functionality is the same as the CSS feature background-size.

editor.loadFromUrl('<url>') // resizes canvas to to file's size by default

editor.loadFromUrl('<url>', {
  size: 'cover'
})

editor.loadFromFile('<File>', {
  size: 'stretch'
})

Improve Label (https://github.com/pikasojs/pikaso/issues/66)

Labels can now be resized from different perspectives.

keepScale will be accessible as of v2.6.0 and by setting that to false, the default scaling behavior will be disabled.
Also, all options for Konva.Transformer are available through transformer

The following configuration should be followed to enable resizing from different aspects:

editor.shapes.label.insert({
    container: {/* config */},
    tag: {/* config */},
    text: {/* config */},
    config: {
      keepScale: false|true, // By setting keepScale to false, the default scaling behavior will be disabled
      transformer: {
        keepRatio: true, // keepRatio set to true to maintain scaling when scaling from corners
        enabledAnchors: ['middle-left', 'middle-right', 'bottom-right'] // Here are all the options available https://konvajs.org/api/Konva.Transformer.html#enabledAnchors__anchor
      }
    }
  })

Improve Export/Import (https://github.com/pikasojs/pikaso/issues/63)

zIndex export/import is now supported.


Thanks to amanver16, ehussain and kanarelo for their contributions.

pikaso - v2.5.0

Published by raminious over 2 years ago

Introducing Measurement Tag

The new Measurement Tag feature displays the size of a shape when drawing or transforming.
https://pikaso.app/#/core/measurement-tag

Improve SVG Drawing

To achieve a smoother drawing experience, the logic for drawing SVG paths has been reimplemented.

Pencil Drawing

Pencil Drawings have a minor difference in that, unlike other shapes, they begin a new drawing when the current one ends.
The editor.shapes.pencil.stopDrawing() method or editor.board.setActiveDrawing(null) method must be called in order to stop pencil drawing.

pikaso - v2.4.1

Published by raminious over 2 years ago

Changelog

  • Fixed global variable issue in Svelte and UMD packages (#57)
  • Added banner to builds

Thanks to magick93

pikaso - v2.4.0

Published by raminious over 2 years ago

Introducing Groups 🚀 🎊

Shapes can be arranged into multiple groups using the Groups.
The class provides a variety of APIs for working with groups.
Groups Full Documentation

New Groups events

  • group:create
  • group:delete
  • group:undelete
  • group:destroy
  • group:attach
  • group:detach
  • group:ungroup

Snap to Grid 😱😱

The Snap To Grid feature ensures that objects can be easily positioned in line with any existing objects on the layer. By default, this feature is disabled, but it is easy to enable
Read more

New Methods

board.gc()

This method destroys all deleted shapes to free-up the memory

shape.name

This getter method returns the name of the shape

pikaso - v2.3.0

Published by raminious over 2 years ago

Changelog

  • Fixed drawing shapes over each other (#44)
  • Added autoSelect option to Drawing settings
  • Removed useless "draw" methods
  • Lint files and update some variable names
pikaso - v2.2.1

Published by raminious almost 3 years ago

Changelog

  • This version is just an upgrade of all packages to their latest versions
pikaso - v2.2.0

Published by raminious about 3 years ago

New Features

  • The ability to convert a background image into a selectable shape. (#22)
editor.board.background.image.isSelectable = true | false
editor.board.background.overlay.isSelectable = true | false

New Methods

  • Added isSelectable setter/getter to ShapeModel (#22)

Bug fixes

  • Fixed transformation issue of shapes after importing a JSON file. (#23)
pikaso - v2.1.1

Published by raminious about 3 years ago

Major Bug Fixes

Enhancement

pikaso - v2.1.0

Published by raminious about 3 years ago