Linked Questions

Popular Questions

Clicking on array of images to add them to Konva stage

Asked by At

I am learning Konvajs and HTML5 Canvas and facing some issues:

  1. Creating a menu populated by an array of images and assign each image a id value equal to its image name. Completed without issue.

  2. Clicking on any one or multiple menu images to draw each image onto Konva stage for further manipulation like rotating etc. Having issues with this:

var pics = ["pic1.png", "pic2.png"]; 
$.each(pics, function( index, value )
  id = value.slice(32, -4);
  $('#menu').append("<img src=' " + value + " ' " + id + " " + "/>"); 

Full code at:

Related Questions