0.5.0 • Published 1 year ago

ember-konva v0.5.0

Weekly downloads
60
License
MIT
Repository
github
Last release
1 year ago

ember-konva

ember-konva Logo

Ember component bindings for the Konva canvas library

Compatibility

  • Ember.js v2.18 or above
  • Ember CLI v2.13 or above
  • Node.js v8 or above

Installation

ember install ember-konva

npm install konva
# OR
yarn add konva

Usage

Examples

{{!-- app/components/konva-example.hbs --}}

<Konva::Stage
  @width={{1440}}
  @height={{800}}
  as |stage|
>
  <stage.Layer as |layer|>
    <layer.Path
      @x={{50}}
      @y={{50}}
      @data="..."
      @fill="#9B2918"
      @scale={{object x=0.4 y=0.4}}
    />

    <layer.Text
      @text="+"
      @fontSize={{36}}
      @x={{168}}
      @y={{60}}
      @fill="#020202"
    />

    <layer.Image
      @x={{200}}
      @y={{40}}
      @height={{180}}
      @width={{180}}
      @scale={{object x=0.4 y=0.4}}
      @image={{this.image}}
    />

    <layer.Text
      @text="="
      @fontSize={{36}}
      @x={{280}}
      @y={{60}}
      @fill="#020202"
    />

    <layer.Path
      @x={{315}}
      @y={{48}}
      @data="..."
      @stroke="#9B2918"
      @strokeWidth={{8}}
      @lineCap="round"
      @lineJoin="round"
      @scale={{object x=0.25 y=0.25}}
    />
  </stage.Layer>
</Konva::Stage>

This addon provides an object helper. This helper should be used instead of the ember built-in hash helper when passing component properties. \ Konva relies on some object prototype methods which are stripped with the hash helper (ember apidoc)

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

0.5.0

1 year ago

0.4.4

2 years ago

0.4.3

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.4.2

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.3.0

3 years ago

0.3.1

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago