ericdrowell / KineticJS

KineticJS is an HTML5 Canvas JavaScript framework that extends the 2d context by enabling canvas interactivity for desktop and mobile applications.
http://www.kineticjs.com
3.98k stars 752 forks source link

difference on Kinect.Image between v5.1 and v4.5 #921

Open dbsima opened 10 years ago

dbsima commented 10 years ago

With v4.5 the loaded images look great http://jsfiddle.net/dbsima/5d2M3/ but with v.5.1 http://jsfiddle.net/5d2M3/1/ the images are losing pixels. What am I doing wrong?

lavrton commented 10 years ago

I believe this plugin https://github.com/lavrton/kineticjs-tips-and-tools/tree/master/debug may help you find problem by yourself. Add https://rawgithub.com/lavrton/kineticjs-tips-and-tools/master/debug/kinetic.debug.js after kinetic.js.

pgrodrigues commented 10 years ago

Hey dbsima,

Some methods were changed in v5.0.0. For example: .getX() is now .x() .setSize(100, 100) is now .size({width: 100, height: 100})

I changed your jsfiddle, and it seems to be working now http://jsfiddle.net/5d2M3/5/

dbsima commented 10 years ago

@pgrodrigues I knew about those changes. My problem is that the images with v5.1 don't have de pixel-ratio as with v4.5.

lavrton commented 10 years ago

Can you provide more information about "losing pixel"? Screenshots?

dbsima commented 10 years ago

@lavrton just look at the 2 jsfinddles http://jsfiddle.net/dbsima/5d2M3/ and http://jsfiddle.net/5d2M3/1/ the images in the first one look better.

lavrton commented 10 years ago

I have ubuntu with chrome 34 and I don't see any difference. What is your system?

dbsima commented 10 years ago

I think that the difference is because of the retina display. I checked on PC with no retina display and there's no difference.

lavrton commented 10 years ago

I think it is related to https://github.com/ericdrowell/KineticJS/issues/819 and https://github.com/ericdrowell/KineticJS/issues/750.

dbsima commented 10 years ago

Yeah. Same problem. Sorry I didn't saw them.