samizdatco / arbor

a graph visualization library using web workers and jQuery
http://arborjs.org
2.66k stars 634 forks source link

[Feature] Support Retina Resolution #49

Open hartator opened 11 years ago

hartator commented 11 years ago

Any plan to support retina resolution?

It looks kind of blurry on my macbook pro retina, maybe I've missed something.

yyang commented 11 years ago

I think it looks fine unless you are using pictures as background or elements.

On Saturday, June 29, 2013, hartator wrote:

Any plan to support retina resolution?

It looks kind of blurry on my macbook pro retina, maybe I've missed something.

— Reply to this email directly or view it on GitHubhttps://github.com/samizdatco/arbor/issues/49 .

Sent from Gmail Mobile

hartator commented 11 years ago

Actually, it's not very sharp, there is some tricks we can do to make a canvas retina-compatible: http://web.archive.org/web/20130415082122/http://joubert.posterous.com/crisp-html-5-canvas-text-on-mobile-phones-and

I don't have a lot experience with that though.

On Sun, Jun 30, 2013 at 8:02 AM, Steve Yang notifications@github.comwrote:

I think it looks fine unless you are using pictures as background or elements.

On Saturday, June 29, 2013, hartator wrote:

Any plan to support retina resolution?

It looks kind of blurry on my macbook pro retina, maybe I've missed something.

— Reply to this email directly or view it on GitHub< https://github.com/samizdatco/arbor/issues/49> .

Sent from Gmail Mobile

— Reply to this email directly or view it on GitHubhttps://github.com/samizdatco/arbor/issues/49#issuecomment-20242791 .

jessepinho commented 10 years ago

Simply resizing the canvas to width / devicePixelRatio is problematic for the mouse events in arborjs, though. You'll have to adjust your calculations for touch events to incorporate the particleSystem.screenSize setting; otherwise, your mouse events won't work as you expect them to. (For example, dragging on the screen affected a node in a different part of the screen when I tried to adjust for a Retina display; I'm still working on the solution to this.)