Questions tagged [jcanvas]

jCanvas is a little jQuery plugin written entirely in JavaScript that makes working with jQuery, and thereby HTML5′s canvas element, a lot easier. Web developers will get a lot of benefit out of using jCanvas. By using jCanvas, you get to work with much simpler code, in which the plugin will do the work and translate it into the relevant code for jQuery to run.

97 questions
0
votes
2 answers

I am unable to implement JCanvas

I am new to learn JCanvas. I am trying to implement a simple JCanvas program. Here is my code:
user3188826
  • 53
  • 1
  • 2
  • 8
0
votes
2 answers

Delayed jCanvas drawing of a line

I have already tried my luck and searched a lot but could not find a solution to my issue. The function in question is supposed to draw a set of lines using jcanvas and pause the drawing according to prerecorded times. Instead it just draws the…
Martin
  • 7
  • 1
  • 4
0
votes
1 answer

Jcanvas coordinates don't start at (0,0)

I'm trying to get my head around HTML 5 canvas, trying jCanvas. But i'm experiencing a weird problem. Im trying to draw an rectangle that should fill the whole canvas using the following code: HTML JS: var…
Philip G
  • 4,098
  • 2
  • 22
  • 41
0
votes
1 answer

Drawing layers with jcanvas: performance optimization

) I have a small web-application which uses jquery and jcanvas (http://calebevans.me/projects/jcanvas/) to print some shapes onto a canvas. It's basically a map. The user can zoom into it and drag it around and whenever he does so everything has to…
Christine
  • 125
  • 8
0
votes
1 answer

jQuery - How do I get jQuery to function properly after loading a remote page with jQuery in it?

jQuery on the current page works. I loaded a remote page to a div in my current page using:
CIA
  • 302
  • 1
  • 5
  • 16
0
votes
1 answer

jcanvas resize text by width and height

I'm using jcanvas and I need to resize text by width and height. Actually the library offers an option to scale by X and Y but I need to do the same with the width and height properties. Is it possible?
david
  • 109
  • 8
0
votes
1 answer

Looping and setting global variables through a future function

I got this section of code I can't seem to make work. It seems to be a scoping issue I was wondering if you have any idea. Here is the section of code I think is broken. click: function(layer) { selectedR = r; …
EpicOfChaos
  • 822
  • 11
  • 23
0
votes
1 answer

javascript: Accessing parent object from event listener in draw method of jcanvas

I am using jcanvas (http://calebevans.me/projects/jcanvas/) for my learning javascript project. I have the following code: var Board = function($element){ this.place_piece = function(piece){ …
Oleg Tarasenko
  • 9,324
  • 18
  • 73
  • 102
0
votes
2 answers

Canvas efficiency when drawing many rectangles

I have a two-dimensional array of colors derived from each pixel coordinate in an image. A slider determines the size of the pixelated rectangles and the image is redrawn in a pixelated form. In nested loops, jCanvas is used to draw each 'pixel' as…
theLucre
  • 121
  • 2
  • 13
0
votes
1 answer

Can two jcanvas layer masks exist on the same canvas?

Is it possible to create two layer independent layer masks on the same canvas? I've tried, without much success. I suspect it's due to masks affecting layer indexes. I've highlighted this by enabling masking on mouseover (see here). If you…
0
votes
1 answer

jCanvas - Stretching image to fit height, and letting it flow over in width

I've been trying to figure out how to scale an image/pattern to fill the canvas in height, but go clip in width using jCanvas. I've been trying to calculate it myself, but my poor skills in math have not been useful. I've also tried to google my way…
tommica
  • 132
  • 12
0
votes
1 answer

HTML 5 Canvas jCanvas/KineticJS when image is draggable, canvas/stage is unresponsive for clicks/touch on an iPad

I've tried this with both jCanvas and KineticJS. When an added image is made draggable: var image = new Kinetic.Image({ image: imageObj, id: imageName, x: parseInt(CoordX), y: parseInt(CoordY), draggable: true }); The canvas/stage become…
0
votes
1 answer

How to select shape on canvas and return its name?

I draw several shapes on a canvas using the jCanvas library with this function: var factoryCounter = 1; $(".atom").click(function() { //get element by tag id var AtomId = jQuery(this).attr("id"); var elementRef = "#el" +…
Dedo Ti
  • 13
  • 5
0
votes
1 answer

Jquery's jcanvas plugin - after rotation x and y of the object doesn't change

I'm using newest version of jquery's jcanvas plugin. When I rotate the object, it's x and y should change, but they don't. Should I call some method for those properties to be reset? I ommited script tags with reference to jquery, and jcanvas,…
Marek M.
  • 3,799
  • 9
  • 43
  • 93
0
votes
2 answers

createPattern not returning as expected

I am getting a TypeError on the variable "pattern" and my script does not execute past the marked break point. I am using the JCanvas and JQuery and all dependencies are in place. What is the reason for the error. There is a similar implementation…
smulholland2
  • 1,143
  • 2
  • 14
  • 28