Closed otis78 closed 5 years ago
Which platform?
For both iOS and Android platform.
I see nothing wrong with your code. Please try 1.0.2 to see. If not please try the demo app with the plugin repo
I tryed the 1.0.2 version but nothing changed.
I try to remove comment at line 5 of your file canvas.d.ts and the problem disappear but i don't know if
@otis78 changing the d.ts file should not have any consequence at runtime. It's only for signature at compilation. This should not change anything. Something might be wrong with your setup. Have you tried the demo from this repo?
This afternoon I also tryed to remove the comment from line 5 of canvas.d.ts
export * from './canvas.android'
and the import works and build correctly.
Now I'm trying the drawRect but in iOS i see only a black box with the same size of the canvas and in Android I can't see it at all. But I need more investigation.
I thing this issue can be closed here. I will open an other if needed.
Sorry for the demo that is written with Vue but I need the Angular version...I'm creating one. When I will be sure that all works I can a pull request if you want.
@otis78 canyou try the latest version? also about the actaual rectangle drawing, are you sure you are using it the right way? you look at the demo or the android canvas doc to see how it works
Hi @farfromrefug, I tryed the latest version and the import problem is solved. Thanks.
About drawing issue. Comparing my code with your demo I partially solved. The plugin is working. I can see the draw in both platform. But will I open an issue about the canvas size. In Android the size is not the expected.
Ok so i close this one
Environment:
tns version 5.2.0 with Angular 7.2.5.
I install the plugin and import it as you wrote in the readme:
But I have the error:
"..../node_modules/nativescript-canvas/canvas"' has no exported member 'CanvasView'
Did I miss something?
Thanks