Comments (7)
I've not gotten into angular2 yet. Is there another alternative to ngIf, my
guess is that's removing it from the tree, but I don't know. Have you tried
just setting the visibility=false when you want to hide one from the view?
Another option might be to animate it out of the screen and adjust the
opacity so it's not visible and then bring it back.
On Wed, Nov 16, 2016, 11:43 AM Eduardo Sanchez [email protected]
wrote:
I need to have different drawing areas but in the same place, so I need to
hide and show the DrawingPads depending on a variable:This is an example of the code:
<template ngFor let-dp let-i="index" [ngForOf]="[1,2,3,4]">
<DrawingPad *ngIf="i == variable" col="0" height="200"
id="drawingPad-{{i}}" penColor="#000" penWidth="3">
But if I draw something in Pad#1, change to Pad#2 (which is empty, as
expected) and the back to Pad#1, the Pad#1 is empty... I need them to keep
what was drawn.Any ideas how to achieve this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#12, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AFulhG87V2ULRycpQTPlxOe0UD87mVKXks5q-0C5gaJpZM4K0NOs
.
from nativescript-drawingpad.
I think it might be loosing the reference and when it shows again it creates a new reference. Is there a way to set the value of the DrawingPad? Like when you do pad.getMyDrawing() and it returns a Promise with the image, set that image returned to a DrawingPad value
from nativescript-drawingpad.
Don't think there's an easy way to take the image and back into the drawing
view. What you could do is layer an image on top of the drawing view and
put the image to the src and then draw on top of the layer.
On Wed, Nov 16, 2016, 12:27 PM Eduardo Sanchez [email protected]
wrote:
I think it might be loosing the reference and when it shows again it
creates a new reference. Is there a way to set the value of the DrawingPad?
Like when you do pad.getMyDrawing() and it returns a Promise with the
image, set that image returned to a DrawingPad value—
You are receiving this because you commented.Reply to this email directly, view it on GitHub
#12 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFulhAM_VUbDIU20HTK7LSNS3vprP8Peks5q-0sJgaJpZM4K0NOs
.
from nativescript-drawingpad.
Is it possible to create the DrawingPad object programmatically and then append it to the view? That way the reference isn't lost..
from nativescript-drawingpad.
I just solved the problem by using visibility: collapsed;
and visibility: visible;
depending on the state, instead of *ngIf. Thanks for your help. I'll dig more into it to se if there's a better way.
from nativescript-drawingpad.
My guess then Is that ngIf removes the view from the tree so it renders new
when added back. Or so it seems that way
On Thu, Nov 17, 2016, 7:38 AM Eduardo Sanchez [email protected]
wrote:
I just solved the problem by using visibility: collapsed; and visibility:
visible; depending on the state, instead of *ngIf. Thanks for your help.
I'll dig more into it to se if there's a better way.—
You are receiving this because you commented.Reply to this email directly, view it on GitHub
#12 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFulhJD_SvI84Vpw8KgT_kd-BDG3KThWks5q_FjVgaJpZM4K0NOs
.
from nativescript-drawingpad.
Yes, that might be. Thanks for your help and quick response!
from nativescript-drawingpad.
Related Issues (20)
- Plugin makes my app crash on minimizing (Android) HOT 1
- Dynamically show or embed a word into the Drawingpad? HOT 1
- {N}-Vue error when getDrawing() is called HOT 7
- background of svg image HOT 1
- How to capture event in drawing pad using "nativescript-drawingpad" plugin
- iOS Xcode Build Fails: "linker command failed"...framework not found SignatureView HOT 3
- Windows 10 gradle build failing but working on mac HOT 6
- How to get drawed content without empty space.
- Drawing Pad is cleared if User presses on pad HOT 1
- Feature Request: Events HOT 1
- Add `setDrawing` and `setDrawingSvg` methods HOT 9
- Support for rotating drawing on saving.
- IOS SignatureView not found HOT 1
- IOS : cannot clear transparent background drawing HOT 1
- IOS : Conflicting gestures when drawing pade loaded in a non-fullscreen modal HOT 1
- Keeps saying "module not found" HOT 1
- App closes when getting image HOT 1
- clearDrawing clear also the backgroundImage
- image to base64 on nativescript 7 HOT 13
- Bug Documentation Angular Section
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativescript-drawingpad.