-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upper canvas retina scaling #5938
Upper canvas retina scaling #5938
Conversation
In
|
Going to look at it, i have a working example somewhere, i ll dig it up. I prefer to keep the one i have, so i'm sure it works already. |
I have to introduce some breaking changes soon. No need for extra config. |
So this is my personal implementation in an app this is the getPointer method of canvas.
those lines can be added in the original function directly. |
urgh i commented on the wrong lines. to work and test, use the Before committing use |
Updated the PR, reverted previous dist mess and fixed your remarks. |
wondering why this scaling is not already working correctly: Does it feels like working to you? |
Just tried this build in our project and it seems to work properly. Getting two failed tests apparently:
|
yes we need to modify tests to be sure retina enabled and disabled is covered. |
@asturur I've started fixing the tests (differentiating between retina disabled and enabled) and they work fine locally but I can't seem to get them to work on the CI. Seems like it always returns the non-retina values. Any pointers? Thanks! |
Hey @asturur, did you have any time yet to take a look at this? Thanks! |
Did not have time, i ll try today/tomorrow. Can you put me as contributor on your fork so i can push up changes? |
@asturur No problem. I've added you as a collaborator. Let me know where I can help! |
Hey @asturur, anything I can help with to move this forward? Thanks! |
I'm sorry really under a pile of things to do. |
QUnit.module('fabric.IText', { | ||
afterEach: function() { | ||
QUnit.module('fabric.IText', function(hooks) { | ||
hooks.afterEach(function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i m not expert with QUnit, can you explain me this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember perfectly but I split up those tests in three blocks: independent of retina, retinaEnabled false and retinaEnabled true. I needed a way to specify the afterEach block for all tests and then the beforeEach calls for the nested modules. I found it this way in the QUnit docs but perhaps there are other ways. I think the reason I changed the line you commented on is to make the hooks calls the same throughout the file. Not quite sure anymore, sorry!
Test fix for PR retina enhance
I just want to read the changes to tests because the diffs are so large i want to understand if is just indentation or there is more. I ll merge the next time i m on the computer. |
Fix the brush for upper canvas retina enhancing
Things starts to be complicated. Retina scaling in Node is always 1, so some tests may be ineffective. |
@asturur Can you give me some pointers on the problem with the textbox? I'm not sure I understand the issue. I'll gladly have a go at fixing it once I know what to look for ;) |
in the function called |
What did you mean by |
you need to set your input language in japanese for example and type things. |
This is what I'm getting with Japanese: https://cloud.cupofco.de/qGuz2ZgB |
that seems fine, but wasn't what i was getting at all. |
Fix some tests i have no idea why broke with last merge master
Hey @asturur, any idea on how I can reproduce this or next steps to get this merged eventually? Thanks. |
ok let's merge! |
@asturur, as requested in #5931, I've moved the retina scaling code from #5746 to a separate branch.
Currently, the pointer offset is incorrect due to the retina scaling. Is this something I should fix in
getPointer
(canvas.class.js:1310
) or would you suggest another place? I'll do the work if you guide me a bit ;)Thanks.