AceBoy
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by AceBoy
-
-
First of all Ionic uses Typescript. That's why it could be a problem.
After some testing I came to the conclusion:
No errors while using import { DrawSVGPlugin } from "gsap/DrawSVGPlugin"
But when I added to the method where I'm making an animation this line - console.log(DrawSVGPlugin), happened something strange. In console it says "undefined" and the animation was done.
So maybe by using console.log I made an initialization of that plugin?
But on the other hand, console.log always says "undefined" value.
Maybe should I do something more besises pasting .js file in node_modules? I found folder called "src" with "minified" and "uncompressed" folders. Should I also put there other DrawSVGPlugin files?
-
Hello.
Recently I bought a package which contains DrawSVGPlugin.
I want to implement this plugin in Ionic3 . As I know a npm package doesn't have plugins from club, nor @types/gsap. I added DrawSVGPlugin.js into node_modules/gsap and later recreated an android platform.
In .ts file as import I tried:
import { DrawSVGPlugin } from "gsap/DrawSVGPlugin";
and as calling plugin:
TweenLite.to("#svg_1", 1, {drawSVG:"40% 60%", ease:Power1.easeInOut});
my html source of svg:
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 100 100" preserveAspectRatio="none"> <line stroke-linecap="undefined" stroke-linejoin="undefined" id="svg_1" y2="45.78805" x2="87.36405" y1="45.24458" x1="8.28813" stroke-width="12.5" stroke="#000" fill="none"/> </svg>
Can anyone tell me what I am doing wrong? Or is there different way of doing it?
DrawSVGPlugin with Ionic3
in GSAP
Posted
I know that I shouldn't do it. But after changing place of .js (eg. outside "src" folder) I have an error
Also I needed to change way of importing to:
When I added in tsconfig.json a line:
I have that error: