Skip to content
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

The script does not work with OnsenUI #22

Open
KVinS opened this issue Dec 20, 2015 · 7 comments
Open

The script does not work with OnsenUI #22

KVinS opened this issue Dec 20, 2015 · 7 comments

Comments

@KVinS
Copy link

KVinS commented Dec 20, 2015

Hi. I'm just starting to deal with Angular.
I want to add to your painter in my application. In a separate file, I have everything works as it should. If I try to add it in my application, canvas is not created. The code is not working. I'll be glad if you look.
www.zip

@KVinS KVinS changed the title The script does not work The script does not work with OnsenUI Dec 20, 2015
@pwambach
Copy link
Owner

Hey, you are not loading the canvas painter module pw.canvas-painter in your angular application.

var app = angular.module('app', ['onsen', 'pascalprecht.translate', 'web.colorpicker']);

should be

var app = angular.module('app', ['onsen', 'pascalprecht.translate', 'web.colorpicker', 'pw.canvas-painter']);

@KVinS
Copy link
Author

KVinS commented Dec 21, 2015

Thank you!

@KVinS
Copy link
Author

KVinS commented Dec 21, 2015

It works, but only on the smartphone.
Moreover, there is error in Y. Wrong working to determine the coordinates and offsets similar.

@KVinS
Copy link
Author

KVinS commented Dec 21, 2015

I did this on jQuerry:
http://draw.kvins.ru/lesson.php?l=en&c=adventure_time&i=16#content
You leave out the scrolling or something.

@KVinS
Copy link
Author

KVinS commented Dec 21, 2015

And I can not figure out how to make a dynamic change of the size of the canvas.
For example, 100% of the width.

@pwambach
Copy link
Owner

Dynamic resizing is not possible with the directive. You have to know the size the canvas should have.

@KVinS
Copy link
Author

KVinS commented Jan 26, 2016

I wrote incorrectly. Determining space available first and then creating the canvas.

Repository owner deleted a comment from sweeper02 Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants