Quantcast
Channel: Ionic Forum - Latest topics
Viewing all 70434 articles
Browse latest View live

'linuxAndroidStudioPath' error when attempting 'npx cap open android' despite value correctly defined

$
0
0

@technosis wrote:

I have added the correct path to android studio in capacitor.config.json but npx cap open android still gives the following error:

[error] Unable to launch Android Studio. You must configure "linuxAndroidStudioPath" in your capacitor.config.json to point to the location of studio.sh, using JavaScript-escaped paths:
Example:
{
  "linuxAndroidStudioPath": "/usr/local/android-studio/bin/studio.sh"
}

I’m running on wsl2 ubuntu-18.04. I have a functioning android studio installation, with all the proper paths set in .bashrc to the sdk and studio.sh. I am able to open the project manually without errors but the npx command does not work.

Thanks in advance!

Posts: 1

Participants: 1

Read full topic


Ionic 4 Cordova - cordova-plugin-firebase-dynamiclinks Error Android build

$
0
0

@nishamane wrote:

I am creating iOS app using ionic4 and Cordova version 9.0.0. Whenever I am trying to install cordova-plugin-firebase-dynamiclinks plugin in my project and try to create Android build, it gives me following error :
Could not determine the dependencies of task ‘:app:compileDebugJavaWithJavac’.
> In project ‘app’ a resolved Google Play services library dependency depends on another at an exact version (e.g. "[18.0.
0]", but isn’t being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.firebase:firebase-messaging:18.0.0 -> com.google.firebase:firebase-iid@[18.0.0], but fire
base-iid version was 20.0.2.

If I try to change version in project.properties and build.gradle file, it gives me another error :
Could not determine the dependencies of task ‘:app:compileDebugJavaWithJavac’.
[6:39 PM] Could not resolve all task dependencies for configuration ‘:app:debugCompileClasspath’.

Could not find com.google.firebase:firebase-messaging:20.0.2.
Required by:project :app

Any ideas how to resolve this…?

Posts: 1

Participants: 1

Read full topic

How to save the photo in local folder

$
0
0

@fawad0301 wrote:

I am working on ionic app with Capacitor plugin, the other related data is locally stored in json file, now i want to save the captured photo in a folder for later use. How it will done?

Posts: 1

Participants: 1

Read full topic

Dark mode vs status bar style iOS

$
0
0

@tkclark wrote:

I’ve added support for dark mode in my app. It simply toggles the class dark on the <body> tag. Looks great until I view it on my iPhone 11 Pro Max and the black text on a white background becomes back text on a black background. Looks like I might need to hook into the native part of the phone to tell it what’s up. Anybody know how to do this?

I am using Ionic/Vue/Vuex if that matters. Thanks!

Before:

After:

Posts: 1

Participants: 1

Read full topic

How integrate FCM with Capacitor?

Ionic - 4, SSL Security issue (critical vulnerability) by AndroBugs Framework

$
0
0

@venkateshoneadvanced wrote:

i am getting following security issue while running the AndroBugs Framework.

SSL Connection Checking:
URLs that are NOT under SSL (Total:8): http://books.google.

  •  Lcom/google/zxing/client/android/book/BrowseBookListener;- >onItemClick(Landroid/widget/AdapterView; Landroid/view/View; I J)V

  •  Lcom/google/zxing/client/android/LocaleManager;- >isBookSearchUrl(Ljava/lang/String;)Z

  •  Lcom/google/zxing/client/android/result/ResultHandler;- >openBookSearch(Ljava/lang/String;)V http://google.com/books  Lcom/google/zxing/client/android/LocaleManager;- >isBookSearchUrl(Ljava/lang/String;)Z http://maps.google.
     Lcom/google/zxing/client/android/result/ResultHandler;->getDirections(D D)V http://www.google  Lcom/google/zxing/client/android/CaptureActivity;->onResume()V http://www.google.

  •  Lcom/google/zxing/client/android/result/supplement/BookResultInfoRetriever; ->retrieveSupplementalInfo()V

  •  Lcom/google/zxing/client/android/result/ResultHandler;- >openProductSearch(Ljava/lang/String;)V http://www.google.com/books?id=  Lcom/google/zxing/client/android/book/SearchBookContentsActivity$Networ kTask;->doInBackground([Ljava/lang/String;)Lorg/json/JSONObject; http://www.google.com/books?vid=isbn  Lcom/google/zxing/client/android/book/SearchBookContentsActivity$Networ kTask;->doInBackground([Ljava/lang/String;)Lorg /json/JSONObject; http://zxing.appspot.com/scan  Lcom/google/zxing/client/android/CaptureActivity;->()V

-> I don’t know what caused this issue. Please recommend what triggers it, and how to resolve it. Thanks ahead

Posts: 1

Participants: 1

Read full topic

Implement Advanced Search on Ionic App

$
0
0

@ZombieBest wrote:

Hello everyone!
I start saying I’m pretty new to the framework and pretty new in web development in general.
On my App I have a JSON array updated from API with more than 100 question objects, a question object is made like this:

{
 "question": "How do you do that?",
 "short_answer": "You should press the red button",
 "full_answer": "After you press the red button a white window will appear",
 "tags": "#red #button #tutorial"
}

I’m trying to implement a search bar where users can search a specific question or issue they may have, so I did it this way:

On the HTML file:
<ion-searchbar *ngIf="data_loaded" placeholder="{{ 'SEARCH_PLACEHOLDER' | translate }}" showCancelButton="never" (ionChange)="searchChange($event)" (ionClear)="searchChange($event)" (ionInput)="onSearchInput()" animated="true" debounce="500" inputmode="search" spellcheck="true" ></ion-searchbar>

On the .ts file:

  searchChange($event){
    this.noResults = false;
    if($event.detail!=null && $event.detail.value!="") {
      //TODO: filter questions here
      let searchVal = $event.detail.value;

      this.filtered_questions = this.filterItems(searchVal);

      if(this.filtered_questions.length == 0) {
        this.noResults = true;
      }

    }else{
      this.filtered_questions = this.globals.all_questions;
    }
    this.showSpinner = false;
  }

  filterItems(searchTerm) {
    return this.globals.all_questions.filter(question => {
      return (question.question.toLowerCase().indexOf(searchTerm.toLowerCase()) > -1 || 
            question.short_answer.toLowerCase().indexOf(searchTerm.toLowerCase()) > -1 ||
            question.full_answer.toLowerCase().indexOf(searchTerm.toLowerCase()) > -1 || 
            question.tags.toLowerCase().indexOf(searchTerm.toLowerCase()) > -1
      );
    });
  }

The filterItems function apply a simple filter to all the questions, returning those that contains the word entered by the user.
This of course does not work well for my particular use-case. I could split the single word out of the phrase entered by the user, but still I think the result would be poor.

I know this is surely more an Angular issue than a Ionic issue, but I wanted to give it a try and ask here if someone has some advice regarding this, maybe using external libraries to improve the search.

Thanks!

Posts: 1

Participants: 1

Read full topic

All native plugins store locally

$
0
0

@ManOnMission wrote:

Can we store all the native plugins repo locally inside the project rather than installing them from a GitHub repo?

Will it affect the specific platform build size or performance?

Posts: 1

Participants: 1

Read full topic


Ionic 5 - iOS crashes after about 5 seconds of run time

$
0
0

@ctfrancia wrote:

I have been spending 2 days on this and it’s killing my will to live. I didn’t add anything different to my code or add a new plugin, I have been scouring online for answers or things to try but I can’t find any solution that fits. after the application launches to my device. it gets to the home screen, I can navigate briefly with no signs of problems but then after about 5 seconds it just inexplicably closes. While having the debug console up of Safari everything shows it launching fine and starting fine. I receive an https response with no errors and then it just closes. there is no error shows before closing it just closes.
here is my ionic info.

I’ve tried removing and adding the platform, cleaning node modules installing again, removing any plugins not being used and check if any of the plugins are old

   Ionic CLI                     : 6.4.0 (/Users/christianfrancia/.config/yarn/global/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.0.7
   @angular-devkit/build-angular : 0.803.24
   @angular-devkit/schematics    : 8.3.26
   @angular/cli                  : 8.3.26
   @ionic/angular-toolkit        : 2.2.0

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0, ios 5.1.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 15 other plugins)

Utility:

   cordova-res (update available: 0.11.0) : 0.9.0
   native-run                             : 0.3.0

System:

   Android SDK Tools : 26.1.1 (/Users/christianfrancia/Library/Android/sdk)
   ios-deploy        : 1.10.0
   ios-sim           : 8.0.2
   NodeJS            : v13.11.0 (/usr/local/Cellar/node/13.11.0/bin/node)
   npm               : 6.13.7
   OS                : macOS Mojave
   Xcode             : Xcode 11.3.1 Build version 11C504

here is the list of plugins

com-badrit-base64 0.2.0 "Base64"
com-sarriaroman-photoviewer 1.2.4 "PhotoViewer"
cordova-android-support-gradle-release 2.1.0 "cordova-android-support-gradle-release"
cordova-plugin-android-permissions 1.0.0 "Permissions"
cordova-plugin-camera 4.1.0 "Camera"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-inappbrowser 3.2.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.1.3 "cordova-plugin-ionic-webview"
cordova-plugin-media 5.0.3 "Media"
cordova-plugin-media-capture 3.0.3 "Capture"
cordova-plugin-splashscreen 5.0.3 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-plugin-x-socialsharing 5.6.3 "SocialSharing"
cordova-sqlite-storage 3.2.0 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"
cordova.plugins.diagnostic 4.0.12 "Diagnostic"
es6-promise-plugin 4.2.2 "Promise"
onesignal-cordova-plugin 2.8.4 "OneSignal Push Notifications"

here is my config.xml

 <?xml version='1.0' encoding='utf-8'?>
  <widget id="test.test.app" version="2.7.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
      <name>TEST</name>
      <description>description</description>
      <author email="test@test.com" href="test">DICUS</author>
      <content src="index.html" />
      <access origin="*" />
      <allow-navigation href="*" />
      <allow-intent href="http://*/*" />
      <allow-intent href="https://*/*" />
      <allow-intent href="tel:*" />
      <allow-intent href="sms:*" />
      <allow-intent href="mailto:*" />
      <allow-intent href="geo:*" />
      <preference name="ScrollEnabled" value="false" />
      <preference name="android-minSdkVersion" value="19" />
      <preference name="BackupWebStorage" value="none" />
      <preference name="SplashMaintainAspectRatio" value="true" />
      <preference name="FadeSplashScreenDuration" value="300" />
      <preference name="SplashShowOnlyFirstTime" value="false" />
      <preference name="SplashScreen" value="screen" />
      <preference name="SplashScreenDelay" value="3000" />
      <preference name="WKWebViewOnly" value="true" />
        <platform name="ios">
       // all the icon heights etc...
      </platform>
      <plugin name="cordova-plugin-statusbar" spec="2.4.2" />
      <plugin name="cordova-plugin-device" spec="2.0.2" />
      <plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
      <plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
      <allow-navigation href="http://192.168.1.41:8101" sessionid="08d8b3b9" />
      <plugin name="cordova-plugin-android-permissions" spec="1.0.0" />
      <plugin name="cordova.plugins.diagnostic" spec="4.0.12">
          <variable name="ANDROID_SUPPORT_VERSION" value="28.+" />
      </plugin>
      <plugin name="cordova-android-support-gradle-release" spec="^2.1.0">
          <variable name="ANDROID_SUPPORT_VERSION" value="27.+" />
      </plugin>
      <plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
      <allow-navigation href="http://192.168.1.38:8100" sessionid="037b298a" />
      <plugin name="cordova-sqlite-storage" spec="3.2.0" />
      <allow-navigation href="http://localhost:8100" sessionid="52ec23e8" />
  </widget>

thanks for any information or help with this issue.

Posts: 1

Participants: 1

Read full topic

Adding tabs on entire app

$
0
0

@AvkAvk wrote:

hi i am facing an issue i want to show ion tabs on all my pages but it is not displaying ion tabs on newly created pages can anyone hep me in this case

how is it possibe ionic v4 or v5

Posts: 1

Participants: 1

Read full topic

Can’t build apk

$
0
0

@dunghoang69 wrote:

I don’t know why. The last time it worked. Now i can’t build anymore.
ionic-app-scripts build --aot --minifyjs --minifycss --target cordova --platform android
[17:43:06] ionic-app-scripts 3.1.11
[17:43:06] build dev started …
[17:43:06] clean started …
[17:43:06] clean finished in 1 ms
[17:43:06] copy started …
[17:43:06] deeplinks started …
[17:43:07] deeplinks finished in 1.10 s
[17:43:07] ngc started …
[17:43:16] ionic-app-script task: “build”
[17:43:16] TypeError: Cannot read property ‘kind’ of undefined
TypeError: Cannot read property ‘kind’ of undefined
at Object.isAmbientModule (/home/hoangdung/Project/HIT/Ionic/ionic-hit-foundation/node_modules/typescript/lib/typescript.js:9099:59)
at collectModuleReferences (/home/hoangdung/Project/HIT/Ionic/ionic-hit-foundation/node_modules/typescript/lib/typescript.js:79472:28)
at collectExternalModuleReferences (/home/hoangdung/Project/HIT/Ionic/ionic-hit-foundation/node_modules/typescript/lib/typescript.js:79449:17)
at processImportedModules (/home/hoangdung/Project/HIT/Ionic/ionic-hit-foundation/node_modules/typescript/lib/typescript.js:79799:13)
at findSourceFile (/home/hoangdung/Project/HIT/Ionic/ionic-hit-foundation/node_modules/typescript/lib/typescript.js:79696:17)
at processImportedModules (/home/hoangdung/Project/HIT/Ionic/ionic-hit-foundation/node_modules/typescript/lib/typescript.js:79840:25)
at findSourceFile (/home/hoangdung/Project/HIT/Ionic/ionic-hit-foundation/node_modules/typescript/lib/typescript.js:79696:17)
at /home/hoangdung/Project/HIT/Ionic/ionic-hit-foundation/node_modules/typescript/lib/typescript.js:79567:85
at getSourceFileFromReferenceWorker (/home/hoangdung/Project/HIT/Ionic/ionic-hit-foundation/node_modules/typescript/lib/typescript.js:79534:34)
at processSourceFile (/home/hoangdung/Project/HIT/Ionic/ionic-hit-foundation/node_modules/typescript/lib/typescript.js:79567:13)
[ERROR] An error occurred while running subprocess ionic-app-scripts.

    ionic-app-scripts build --aot --minifyjs --minifycss --target cordova --platform... exited with exit code 1.
    
    Re-running this command with the --verbose flag may provide more information.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hit-foundation@0.0.1 build-android-prod: ionic cordova build android --aot --minifyjs --minifycss --release
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hit-foundation@0.0.1 build-android-prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/hoangdung/.npm/_logs/2020-04-03T10_43_16_602Z-debug.log
========================== The package.json

Posts: 2

Participants: 1

Read full topic

How to get ion-header height in Angular (the right way)?

$
0
0

@Arkthur wrote:

In my app I need to get the height of an ion-header element. I’ve tried with:

<!-- TEMPLATE -->
<ion-header #header>
  <!-- ... -->
<ion-header>
<!-- ... -->
// COMPONENT
ViewChild('header') header: IonHeader;
// ...
getHeaderHeight() {
  return this.header.el.offsetHeight;
}

This only works if header's type is any. If it is IonHeader it throws this error:

Property 'el' is protected and only accessible within class 'IonHeader' and its subclasses.

The error is pretty clear. What bugs me is the fact that there should be a non-hacky way to do this. Using any just feels like cheating.

Posts: 1

Participants: 1

Read full topic

Content not scrolling with long data IONIC5?Why

My stencil + storybook setup

Facing Issue while creating Ionic App

$
0
0

@Pranom wrote:

I am creating my first ionic app. I am facing a issue in the command ‘ionic start myApp tabs’
I have attached npm log file here.
Please help me to resolve this issue

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'i' ]
2 info using npm@6.14.1
3 info using node@v12.4.0
4 verbose npm-session 9a9d573b4ac3d758
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall myApp@0.0.1
7 info lifecycle myApp@0.0.1~preinstall: myApp@0.0.1
8 silly install loadCurrentTree
9 silly install readLocalPackageData
10 timing stage:loadCurrentTree Completed in 143ms
11 silly install loadIdealTree
12 silly install cloneCurrentTreeToIdealTree
13 timing stage:loadIdealTree:cloneCurrentTree Completed in 1ms
14 silly install loadShrinkwrap
15 timing stage:loadIdealTree:loadShrinkwrap Completed in 84ms
16 silly install loadAllDepsIntoIdealTree
17 http fetch GET 304 https://registry.npmjs.org/@testing-library%2freact 1181ms (from cache)
18 silly pacote range manifest for @testing-library/react@^9.4.0 fetched in 1188ms
19 http fetch GET 304 https://registry.npmjs.org/@types%2fjest 1190ms (from cache)
20 http fetch GET 304 https://registry.npmjs.org/@types%2fnode 1201ms (from cache)
21 http fetch GET 304 https://registry.npmjs.org/@testing-library%2fuser-event 1221ms (from cache)
22 silly pacote range manifest for @types/jest@^24.0.25 fetched in 1228ms
23 http fetch GET 304 https://registry.npmjs.org/@types%2freact 1230ms (from cache)
24 silly pacote range manifest for @types/node@^12.12.24 fetched in 1242ms
25 silly pacote range manifest for @testing-library/user-event@^8.0.3 fetched in 1251ms
26 silly pacote range manifest for @types/react@^16.9.17 fetched in 1251ms
27 http fetch GET 200 https://registry.npmjs.org/react 25ms (from cache)
28 silly fetchPackageMetaData error for react@^16.12.0 Unexpected end of JSON input while parsing near '...on":"16.9.0","depende'
29 http fetch GET 304 https://registry.npmjs.org/@testing-library%2fjest-dom 1280ms (from cache)
30 http fetch GET 304 https://registry.npmjs.org/@types%2freact-router 1276ms (from cache)
31 silly pacote range manifest for @testing-library/jest-dom@^4.2.4 fetched in 1286ms
32 silly fetchPackageMetaData error for @types/react-router@^5.1.4 Unexpected end of JSON input while parsing near '...-----END PGP SIGNATUR'
33 http fetch GET 200 https://registry.npmjs.org/typescript 17ms (from cache)
34 silly fetchPackageMetaData error for typescript@3.7.4 Unexpected end of JSON input while parsing near '...source-map":"latest",'
35 http fetch GET 304 https://registry.npmjs.org/@types%2freact-dom 1330ms (from cache)
36 silly pacote range manifest for @types/react-dom@^16.9.4 fetched in 1332ms
37 http fetch GET 304 https://registry.npmjs.org/@types%2freact-router-dom 270ms (from cache)
38 silly pacote range manifest for @types/react-router-dom@^5.1.3 fetched in 272ms
39 http fetch GET 304 https://registry.npmjs.org/ionicons 233ms (from cache)
40 silly pacote range manifest for ionicons@^5.0.0 fetched in 243ms
41 http fetch GET 304 https://registry.npmjs.org/react-dom 229ms (from cache)
42 silly pacote range manifest for react-dom@^16.12.0 fetched in 236ms
43 http fetch GET 304 https://registry.npmjs.org/react-router-dom 240ms (from cache)
44 http fetch GET 304 https://registry.npmjs.org/react-router 263ms (from cache)
45 silly pacote range manifest for react-router-dom@^5.1.2 fetched in 248ms
46 silly pacote range manifest for react-router@^5.1.2 fetched in 272ms
47 http fetch GET 304 https://registry.npmjs.org/react-scripts 249ms (from cache)
48 silly fetchPackageMetaData error for react-scripts@3.4.0 Unexpected end of JSON input while parsing near '...8137e3f6cbd649008fa96'
49 http fetch GET 304 https://registry.npmjs.org/@babel%2fruntime 241ms (from cache)
50 silly pacote range manifest for @babel/runtime@^7.8.4 fetched in 243ms
51 http fetch GET 304 https://registry.npmjs.org/@testing-library%2fdom 238ms (from cache)
52 silly pacote range manifest for @testing-library/dom@^6.15.0 fetched in 246ms
53 http fetch GET 304 https://registry.npmjs.org/@types%2ftesting-library__react 221ms (from cache)
54 silly pacote range manifest for @types/testing-library__react@^9.1.2 fetched in 231ms
55 http fetch GET 304 https://registry.npmjs.org/jest-diff 221ms (from cache)
56 silly pacote range manifest for jest-diff@^24.3.0 fetched in 229ms
57 http fetch GET 304 https://registry.npmjs.org/@types%2fprop-types 234ms (from cache)
58 silly pacote range manifest for @types/prop-types@* fetched in 239ms
59 http fetch GET 304 https://registry.npmjs.org/@babel%2fruntime 217ms (from cache)
60 silly pacote range manifest for @babel/runtime@^7.5.1 fetched in 224ms
61 silly pacote range manifest for @types/react@* fetched in 8ms
62 http fetch GET 304 https://registry.npmjs.org/csstype 246ms (from cache)
63 silly fetchPackageMetaData error for csstype@^2.2.0 Unexpected end of JSON input while parsing near '...7yZpgRj/dG6OCZ/i1td7L'
64 http fetch GET 304 https://registry.npmjs.org/css 249ms (from cache)
65 http fetch GET 304 https://registry.npmjs.org/css.escape 235ms (from cache)
66 silly pacote range manifest for css.escape@^1.5.1 fetched in 243ms
67 http fetch GET 304 https://registry.npmjs.org/jest-diff 221ms (from cache)
68 silly pacote range manifest for jest-diff@^24.0.0 fetched in 227ms
69 http fetch GET 304 https://registry.npmjs.org/jest-matcher-utils 209ms (from cache)
70 silly pacote range manifest for jest-matcher-utils@^24.0.0 fetched in 227ms
71 http fetch GET 304 https://registry.npmjs.org/pretty-format 221ms (from cache)
72 silly pacote range manifest for pretty-format@^24.0.0 fetched in 227ms
73 http fetch GET 304 https://registry.npmjs.org/redent 213ms (from cache)
74 silly pacote range manifest for redent@^3.0.0 fetched in 221ms
75 silly pacote range manifest for @babel/runtime@^7.1.2 fetched in 2ms
76 http fetch GET 304 https://registry.npmjs.org/@types%2fhistory 219ms (from cache)
77 http fetch GET 304 https://registry.npmjs.org/@types%2freact-router 217ms (from cache)
78 silly fetchPackageMetaData error for @types/react-router@* Unexpected end of JSON input while parsing near '...-----END PGP SIGNATUR'
79 silly pacote range manifest for @types/history@* fetched in 229ms
80 silly pacote version manifest for react-router@5.1.2 fetched in 17ms
81 http fetch GET 200 https://registry.npmjs.org/css/-/css-2.2.4.tgz 317ms
82 silly pacote range manifest for css@^2.2.3 fetched in 587ms
83 http fetch GET 304 https://registry.npmjs.org/loose-envify 328ms (from cache)
84 silly pacote range manifest for loose-envify@^1.1.0 fetched in 330ms
85 http fetch GET 304 https://registry.npmjs.org/object-assign 319ms (from cache)
86 silly pacote range manifest for object-assign@^4.1.1 fetched in 327ms
87 http fetch GET 304 https://registry.npmjs.org/prop-types 236ms (from cache)
88 http fetch GET 304 https://registry.npmjs.org/scheduler 236ms (from cache)
89 silly pacote range manifest for prop-types@^15.6.2 fetched in 256ms
90 silly pacote range manifest for scheduler@^0.19.1 fetched in 248ms
91 http fetch GET 304 https://registry.npmjs.org/history 272ms (from cache)
92 http fetch GET 304 https://registry.npmjs.org/@ionic%2freact 2237ms (from cache)
93 silly pacote range manifest for history@^4.9.0 fetched in 315ms
94 silly pacote range manifest for @ionic/react@^5.0.7 fetched in 2286ms
95 http fetch GET 304 https://registry.npmjs.org/@ionic%2freact-router 2305ms (from cache)
96 http fetch GET 304 https://registry.npmjs.org/loose-envify 337ms (from cache)
97 silly pacote range manifest for loose-envify@^1.3.1 fetched in 341ms
98 silly pacote range manifest for @ionic/react-router@^5.0.7 fetched in 2338ms
99 http fetch GET 304 https://registry.npmjs.org/tiny-invariant 331ms (from cache)
100 http fetch GET 304 https://registry.npmjs.org/tiny-warning 224ms (from cache)
101 http fetch GET 304 https://registry.npmjs.org/hoist-non-react-statics 217ms (from cache)
102 silly pacote range manifest for tiny-invariant@^1.0.2 fetched in 341ms
103 silly pacote range manifest for tiny-warning@^1.0.0 fetched in 227ms
104 silly pacote range manifest for hoist-non-react-statics@^3.1.0 fetched in 225ms
105 http fetch GET 304 https://registry.npmjs.org/mini-create-react-context 227ms (from cache)
106 silly pacote range manifest for pretty-format@^25.1.0 fetched in 20ms
107 silly pacote range manifest for @types/react-dom@* fetched in 1ms
108 silly pacote range manifest for mini-create-react-context@^0.3.0 fetched in 238ms
109 http fetch GET 304 https://registry.npmjs.org/path-to-regexp 228ms (from cache)
110 http fetch GET 304 https://registry.npmjs.org/react-is 230ms (from cache)
111 silly pacote range manifest for path-to-regexp@^1.7.0 fetched in 240ms
112 silly pacote range manifest for react-is@^16.6.0 fetched in 240ms
113 silly pacote range manifest for pretty-format@^24.9.0 fetched in 2ms
114 silly pacote range manifest for jest-diff@^24.9.0 fetched in 6ms
115 http fetch GET 304 https://registry.npmjs.org/regenerator-runtime 245ms (from cache)
116 silly pacote range manifest for regenerator-runtime@^0.13.4 fetched in 251ms
117 http fetch GET 304 https://registry.npmjs.org/@sheerun%2fmutationobserver-shim 258ms (from cache)
118 silly pacote range manifest for @sheerun/mutationobserver-shim@^0.3.2 fetched in 264ms
119 silly pacote range manifest for react-is@^16.8.4 fetched in 1ms
120 http fetch GET 304 https://registry.npmjs.org/@types%2ftesting-library__dom 213ms (from cache)
121 silly pacote range manifest for @types/testing-library__dom@^6.12.1 fetched in 218ms
122 http fetch GET 304 https://registry.npmjs.org/aria-query 221ms (from cache)
123 silly pacote range manifest for aria-query@^4.0.2 fetched in 226ms
124 http fetch GET 304 https://registry.npmjs.org/dom-accessibility-api 214ms (from cache)
125 silly pacote range manifest for dom-accessibility-api@^0.3.0 fetched in 220ms
126 http fetch GET 304 https://registry.npmjs.org/wait-for-expect 217ms (from cache)
127 silly pacote range manifest for wait-for-expect@^3.0.2 fetched in 226ms
128 http fetch GET 304 https://registry.npmjs.org/@types%2ftesting-library__dom 216ms (from cache)
129 silly pacote range manifest for @types/testing-library__dom@* fetched in 221ms
130 http fetch GET 304 https://registry.npmjs.org/diff-sequences 219ms (from cache)
131 silly pacote range manifest for diff-sequences@^24.9.0 fetched in 224ms
132 http fetch GET 304 https://registry.npmjs.org/jest-get-type 202ms (from cache)
133 silly pacote range manifest for jest-get-type@^24.9.0 fetched in 208ms
134 silly pacote range manifest for loose-envify@^1.4.0 fetched in 1ms
135 silly pacote range manifest for react-is@^16.8.1 fetched in 2ms
136 silly pacote range manifest for loose-envify@^1.2.0 fetched in 2ms
137 http fetch GET 304 https://registry.npmjs.org/@jest%2ftypes 211ms (from cache)
138 silly pacote range manifest for @jest/types@^24.9.0 fetched in 217ms
139 http fetch GET 304 https://registry.npmjs.org/ansi-regex 206ms (from cache)
140 silly pacote range manifest for ansi-regex@^4.0.0 fetched in 208ms
141 http fetch GET 304 https://registry.npmjs.org/indent-string 211ms (from cache)
142 silly pacote range manifest for indent-string@^4.0.0 fetched in 216ms
143 silly pacote range manifest for ionicons@^5.0.1 fetched in 2ms
144 silly pacote range manifest for react-is@^16.7.0 fetched in 1ms
145 silly pacote range manifest for @jest/types@^25.2.6 fetched in 5ms
146 silly pacote range manifest for ansi-regex@^5.0.0 fetched in 6ms
147 http fetch GET 200 https://registry.npmjs.org/inherits 223ms
148 http fetch GET 304 https://registry.npmjs.org/strip-indent 251ms (from cache)
149 silly pacote range manifest for strip-indent@^3.0.0 fetched in 256ms
150 silly pacote range manifest for react-is@^16.12.0 fetched in 1ms
151 http fetch GET 200 https://registry.npmjs.org/source-map 515ms
152 http fetch GET 200 https://registry.npmjs.org/source-map-resolve 627ms
153 http fetch GET 200 https://registry.npmjs.org/urix 628ms
154 http fetch GET 304 https://registry.npmjs.org/js-tokens 625ms (from cache)
155 silly pacote range manifest for js-tokens@^3.0.0 || ^4.0.0 fetched in 631ms
156 silly pacote range manifest for tiny-warning@^1.0.2 fetched in 1ms
157 silly pacote range manifest for @babel/runtime@^7.4.0 fetched in 2ms
158 http fetch GET 304 https://registry.npmjs.org/resolve-pathname 626ms (from cache)
159 http fetch GET 304 https://registry.npmjs.org/value-equal 611ms (from cache)
160 silly pacote range manifest for resolve-pathname@^3.0.0 fetched in 633ms
161 silly pacote range manifest for pretty-format@^24.3.0 fetched in 2ms
162 silly pacote range manifest for value-equal@^1.0.1 fetched in 616ms
163 silly pacote range manifest for @babel/runtime@^7.7.4 fetched in 2ms
164 http fetch GET 304 https://registry.npmjs.org/ansi-styles 1464ms (from cache)
165 silly pacote range manifest for ansi-styles@^4.0.0 fetched in 1469ms
166 http fetch GET 200 https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz 1730ms
167 silly pacote range manifest for inherits@^2.0.3 fetched in 1957ms
168 http fetch GET 304 https://registry.npmjs.org/gud 3307ms (from cache)
169 silly pacote range manifest for gud@^1.0.0 fetched in 3320ms
170 http fetch GET 200 https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz 5420ms
171 silly pacote range manifest for source-map@^0.6.1 fetched in 5942ms
172 http fetch GET 200 https://registry.npmjs.org/urix/-/urix-0.1.0.tgz 5369ms
173 silly pacote range manifest for urix@^0.1.0 fetched in 6001ms
174 warn deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
175 http fetch GET 200 https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz 5494ms
176 silly pacote range manifest for source-map-resolve@^0.5.2 fetched in 6129ms
177 http fetch GET 304 https://registry.npmjs.org/isarray 5482ms (from cache)
178 silly pacote version manifest for isarray@0.0.1 fetched in 5487ms
179 http fetch GET 304 https://registry.npmjs.org/@babel%2fruntime-corejs3 5489ms (from cache)
180 silly pacote range manifest for @babel/runtime-corejs3@^7.7.4 fetched in 5494ms
181 http fetch GET 304 https://registry.npmjs.org/@types%2fistanbul-lib-coverage 5535ms (from cache)
182 silly pacote range manifest for @types/istanbul-lib-coverage@^2.0.0 fetched in 5541ms
183 http fetch GET 304 https://registry.npmjs.org/@types%2fistanbul-reports 4898ms (from cache)
184 silly pacote range manifest for @types/istanbul-reports@^1.1.1 fetched in 4903ms
185 http fetch GET 304 https://registry.npmjs.org/@types%2fyargs 4693ms (from cache)
186 silly pacote range manifest for @types/yargs@^13.0.0 fetched in 4701ms
187 http fetch GET 304 https://registry.npmjs.org/@types%2fyargs 3468ms (from cache)
188 silly pacote range manifest for @types/yargs@^15.0.0 fetched in 3475ms
189 http fetch GET 304 https://registry.npmjs.org/chalk 3417ms (from cache)
190 silly pacote range manifest for chalk@^3.0.0 fetched in 3423ms
191 silly pacote range manifest for @types/istanbul-lib-coverage@* fetched in 2ms
192 http fetch GET 304 https://registry.npmjs.org/min-indent 3451ms (from cache)
193 silly pacote range manifest for min-indent@^1.0.0 fetched in 3457ms
194 http fetch GET 304 https://registry.npmjs.org/@types%2fcolor-name 3342ms (from cache)
195 silly pacote range manifest for @types/color-name@^1.1.1 fetched in 3351ms
196 silly pacote range manifest for ansi-styles@^4.1.0 fetched in 2ms
197 http fetch GET 200 https://registry.npmjs.org/atob 3355ms
198 http fetch GET 304 https://registry.npmjs.org/color-convert 3399ms (from cache)
199 silly pacote range manifest for color-convert@^2.0.1 fetched in 3404ms
200 http fetch GET 200 https://registry.npmjs.org/decode-uri-component 3332ms
201 http fetch GET 200 https://registry.npmjs.org/resolve-url 4758ms
202 http fetch GET 200 https://registry.npmjs.org/source-map-url 4709ms
203 http fetch GET 304 https://registry.npmjs.org/core-js-pure 5755ms (from cache)
204 silly pacote range manifest for core-js-pure@^3.0.0 fetched in 5762ms
205 http fetch GET 304 https://registry.npmjs.org/@types%2fistanbul-lib-report 3460ms (from cache)
206 silly pacote range manifest for @types/istanbul-lib-report@* fetched in 3468ms
207 http fetch GET 304 https://registry.npmjs.org/supports-color 3348ms (from cache)
208 silly pacote range manifest for supports-color@^7.1.0 fetched in 3353ms
209 http fetch GET 304 https://registry.npmjs.org/@types%2fyargs-parser 3369ms (from cache)
210 silly pacote range manifest for @types/yargs-parser@* fetched in 3374ms
211 http fetch GET 200 https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz 3385ms
212 silly pacote range manifest for decode-uri-component@^0.2.0 fetched in 6724ms
213 http fetch GET 304 https://registry.npmjs.org/color-name 3401ms (from cache)
214 silly pacote range manifest for color-name@~1.1.4 fetched in 3406ms
215 http fetch GET 200 https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz 1751ms
216 silly pacote range manifest for resolve-url@^0.2.1 fetched in 6514ms
217 warn deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
218 http fetch GET 200 https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz 1799ms
219 silly pacote range manifest for source-map-url@^0.4.0 fetched in 6510ms
220 http fetch GET 200 https://registry.npmjs.org/atob/-/atob-2.1.2.tgz 3815ms
221 silly pacote range manifest for atob@^2.1.2 fetched in 7175ms
222 http fetch GET 304 https://registry.npmjs.org/has-flag 518ms (from cache)
223 silly pacote range manifest for has-flag@^4.0.0 fetched in 522ms
224 http fetch GET 200 https://registry.npmjs.org/@ionic%2fcore 24490ms
225 http fetch GET 200 https://registry.npmjs.org/@ionic/core/-/core-5.0.7.tgz 32849ms
226 silly pacote version manifest for @ionic/core@5.0.7 fetched in 57370ms
227 silly pacote range manifest for @ionic/react@^5.0.7 fetched in 20ms
228 silly resolveWithNewModule @ionic/react@5.0.7 checking installable status
229 silly pacote range manifest for @ionic/react-router@^5.0.7 fetched in 21ms
230 silly resolveWithNewModule @ionic/react-router@5.0.7 checking installable status
231 silly pacote range manifest for @testing-library/jest-dom@^4.2.4 fetched in 21ms
232 silly resolveWithNewModule @testing-library/jest-dom@4.2.4 checking installable status
233 silly pacote range manifest for @testing-library/react@^9.4.0 fetched in 23ms
234 silly resolveWithNewModule @testing-library/react@9.5.0 checking installable status
235 silly pacote range manifest for @testing-library/user-event@^8.0.3 fetched in 24ms
236 silly resolveWithNewModule @testing-library/user-event@8.1.3 checking installable status
237 silly pacote range manifest for @types/jest@^24.0.25 fetched in 24ms
238 silly resolveWithNewModule @types/jest@24.9.1 checking installable status
239 silly pacote range manifest for @types/react@^16.9.17 fetched in 25ms
240 silly resolveWithNewModule @types/react@16.9.32 checking installable status
241 silly pacote range manifest for @types/node@^12.12.24 fetched in 25ms
242 silly resolveWithNewModule @types/node@12.12.34 checking installable status
243 silly pacote range manifest for @types/react-dom@^16.9.4 fetched in 26ms
244 silly resolveWithNewModule @types/react-dom@16.9.6 checking installable status
245 silly pacote range manifest for @types/react-router-dom@^5.1.3 fetched in 8ms
246 silly resolveWithNewModule @types/react-router-dom@5.1.3 checking installable status
247 silly pacote range manifest for ionicons@^5.0.0 fetched in 8ms
248 silly resolveWithNewModule ionicons@5.0.1 checking installable status
249 silly pacote range manifest for react-dom@^16.12.0 fetched in 7ms
250 silly resolveWithNewModule react-dom@16.13.1 checking installable status
251 silly pacote range manifest for react-router@^5.1.2 fetched in 7ms
252 silly resolveWithNewModule react-router@5.1.2 checking installable status
253 silly pacote range manifest for react-router-dom@^5.1.2 fetched in 8ms
254 silly resolveWithNewModule react-router-dom@5.1.2 checking installable status
255 http fetch GET 200 https://registry.npmjs.org/react 12ms (from cache)
256 silly fetchPackageMetaData error for react@^16.12.0 Unexpected end of JSON input while parsing near '...on":"16.9.0","depende'
257 http fetch GET 304 https://registry.npmjs.org/@types%2freact-router 245ms (from cache)
258 silly fetchPackageMetaData error for @types/react-router@^5.1.4 Unexpected end of JSON input while parsing near '...-----END PGP SIGNATUR'
259 http fetch GET 304 https://registry.npmjs.org/typescript 3052ms (from cache)
260 silly fetchPackageMetaData error for typescript@3.7.4 Unexpected end of JSON input while parsing near '...source-map":"latest",'
261 http fetch GET 304 https://registry.npmjs.org/react-scripts 3060ms (from cache)
262 silly fetchPackageMetaData error for react-scripts@3.4.0 Unexpected end of JSON input while parsing near '...8137e3f6cbd649008fa96'
263 timing stage:rollbackFailedOptional Completed in 1ms
264 timing stage:runTopLevelLifecycles Completed in 63459ms
265 silly saveTree myApp@0.0.1
265 silly saveTree ├─┬ @capacitor/cli@1.5.2
265 silly saveTree │ ├─┬ chalk@2.4.2
265 silly saveTree │ │ ├─┬ ansi-styles@3.2.1
265 silly saveTree │ │ │ └─┬ color-convert@1.9.3
265 silly saveTree │ │ │   └── color-name@1.1.3
265 silly saveTree │ │ ├── escape-string-regexp@1.0.5
265 silly saveTree │ │ └─┬ supports-color@5.5.0
265 silly saveTree │ │   └── has-flag@3.0.0
265 silly saveTree │ ├── commander@2.20.3
265 silly saveTree │ ├── compare-versions@3.6.0
265 silly saveTree │ ├─┬ fs-extra@4.0.3
265 silly saveTree │ │ ├── graceful-fs@4.2.3
265 silly saveTree │ │ ├── jsonfile@4.0.0
265 silly saveTree │ │ └── universalify@0.1.2
265 silly saveTree │ ├─┬ inquirer@6.3.1
265 silly saveTree │ │ ├── ansi-escapes@3.2.0
265 silly saveTree │ │ ├─┬ cli-cursor@2.1.0
265 silly saveTree │ │ │ └─┬ restore-cursor@2.0.0
265 silly saveTree │ │ │   ├─┬ onetime@2.0.1
265 silly saveTree │ │ │   │ └── mimic-fn@1.2.0
265 silly saveTree │ │ │   └── signal-exit@3.0.3
265 silly saveTree │ │ ├── cli-width@2.2.0
265 silly saveTree │ │ ├─┬ external-editor@3.1.0
265 silly saveTree │ │ │ ├── chardet@0.7.0
265 silly saveTree │ │ │ ├─┬ iconv-lite@0.4.24
265 silly saveTree │ │ │ │ └── safer-buffer@2.1.2
265 silly saveTree │ │ │ └─┬ tmp@0.0.33
265 silly saveTree │ │ │   └── os-tmpdir@1.0.2
265 silly saveTree │ │ ├── figures@2.0.0
265 silly saveTree │ │ ├── lodash@4.17.15
265 silly saveTree │ │ ├── mute-stream@0.0.7
265 silly saveTree │ │ ├─┬ run-async@2.4.0
265 silly saveTree │ │ │ └── is-promise@2.1.0
265 silly saveTree │ │ ├─┬ rxjs@6.5.5
265 silly saveTree │ │ │ └── tslib@1.11.1
265 silly saveTree │ │ ├─┬ string-width@2.1.1
265 silly saveTree │ │ │ ├── is-fullwidth-code-point@2.0.0
265 silly saveTree │ │ │ └─┬ strip-ansi@4.0.0
265 silly saveTree │ │ │   └── ansi-regex@3.0.0
265 silly saveTree │ │ ├─┬ strip-ansi@5.2.0
265 silly saveTree │ │ │ └── ansi-regex@4.1.0
265 silly saveTree │ │ └── through@2.3.8
265 silly saveTree │ ├─┬ open@6.4.0
265 silly saveTree │ │ └── is-wsl@1.1.0
265 silly saveTree │ ├─┬ ora@1.4.0
265 silly saveTree │ │ ├── cli-spinners@1.3.1
265 silly saveTree │ │ └── log-symbols@2.2.0
265 silly saveTree │ ├─┬ plist@3.0.1
265 silly saveTree │ │ ├── base64-js@1.3.1
265 silly saveTree │ │ ├── xmlbuilder@9.0.7
265 silly saveTree │ │ └── xmldom@0.1.31
265 silly saveTree │ ├── semver@5.7.1
265 silly saveTree │ ├─┬ which@1.3.1
265 silly saveTree │ │ └── isexe@2.0.0
265 silly saveTree │ └─┬ xml2js@0.4.23
265 silly saveTree │   ├── sax@1.2.4
265 silly saveTree │   └── xmlbuilder@11.0.1
265 silly saveTree ├── @capacitor/core@1.5.2
265 silly saveTree ├── @ionic/react-router@5.0.7
265 silly saveTree ├─┬ @ionic/react@5.0.7
265 silly saveTree │ └── ionicons@5.0.1
265 silly saveTree ├── @testing-library/jest-dom@4.2.4
265 silly saveTree ├── @testing-library/react@9.5.0
265 silly saveTree ├── @testing-library/user-event@8.1.3
265 silly saveTree ├── @types/jest@24.9.1
265 silly saveTree ├── @types/node@12.12.34
265 silly saveTree ├─┬ @types/react-dom@16.9.6
265 silly saveTree │ └── @types/react@16.9.32
265 silly saveTree ├── @types/react-router-dom@5.1.3
265 silly saveTree ├── @types/react@16.9.32
265 silly saveTree ├── ionicons@5.0.1
265 silly saveTree ├── react-dom@16.13.1
265 silly saveTree ├─┬ react-router-dom@5.1.2
265 silly saveTree │ └── react-router@5.1.2
265 silly saveTree └── react-router@5.1.2
266 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...on":"16.9.0","depende'
266 verbose stack     at JSON.parse (<anonymous>)
266 verbose stack     at parseJson (/usr/local/lib/node_modules/npm/node_modules/json-parse-better-errors/index.js:7:17)
266 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/node-fetch-npm/src/body.js:96:50
266 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:89:5)
267 verbose cwd /Users/vignesh-6596/Documents/homeFiles/Ionic/myApp
268 verbose Darwin 17.7.0
269 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "i"
270 verbose node v12.4.0
271 verbose npm  v6.14.1
272 error Unexpected end of JSON input while parsing near '...on":"16.9.0","depende'
273 verbose exit [ 1, true ]

Posts: 1

Participants: 1

Read full topic


Ionic 5 Animation issue with gesture

$
0
0

@Jinfreeks wrote:

I have a problem with an animation, I want to display a div on slide up, and I use gesture to give the impression that the user have to drag it.

But when we release the div (on end of touch event), the animation event seems to start at an different point than the one I indicated.

I’m unable right now to recreate my issue with a JSFiddle, but I’ve create a short video (Just the first 3sec, I recommend to read it at x0.25) : https://youtu.be/z50BDjhKDh4

This is my code :

ionViewDidEnter() {
   this.gesture = this.gestureCtrl.create({
     el: this.source.nativeElement,
     threshold:10,
     gestureName: 'show-profile',
     gesturePriority:100,
     disableScroll:true,
     direction:'y',
     onStart: (detail) => { 
       this.onStart(detail); 
     },
     onMove: (detail) => { 
       this.onMove(detail); 
     },
     onEnd: (detail) => {
       this.onEnd(detail);
     }
   })

   this.profileGest = this.gestureCtrl.create({
     el: this.description.nativeElement,
     threshold:10,
     gestureName: 'hide-profile',
     gesturePriority:10,
     disableScroll:true,
     direction:'y',
     onStart: (detail) => { 
       this.onStartProfile(detail); 
     },
     onMove: (detail) => { 
       this.onMoveProfile(detail); 
     },
     onEnd: (detail) => {
       this.onEndProfile(detail);
     }
   })

   this.gesture.enable();

   this.bounceInUp = this.animationCtrl.create()
   .addElement(this.description.nativeElement)
   .duration(400)
   .keyframes([
     { offset: 0, transform: 'translateY(' + this.profilePeak + 'px)' },
     { offset: 0.6, transform: 'translateY(-300px)' },
     { offset: 0.7, transform: 'translateY(-270px)' },
     { offset: 0.9, transform: 'translateY(-285px)' },
     { offset: 1, transform: 'translateY(-280px)' }
   ])
   .beforeStyles({'transform':'translateY(' + this.profilePeak + 'px)'})
   .afterStyles({'transform':'translateY(-280px)'})

   this.headerDown = this.animationCtrl.create()
   .addElement(this.header.nativeElement)
   .duration(400)
   .keyframes([
     { offset: 0, transform: 'translateY(' + this.headerPeak + 'px)' },
     { offset: 0.6, transform: 'translateY(20px)' },
     { offset: 0.7, transform: 'translateY(-10px)' },
     { offset: 0.9, transform: 'translateY(5px)' },
     { offset: 1, transform: 'translateY(0px)' }
   ])
   .beforeStyles({'transform':'translateY(' + this.headerPeak + 'px)'})
   .afterStyles({'transform':'translateY(0px)'})

   this.fallDown = this.animationCtrl.create()
   .addElement(this.description.nativeElement)
   .duration(400)
   .fromTo('transform', 'translateY(' + this.profilePeak + 'px)', 'translateY(0px)')
   .afterStyles({'transform':'translateY(0px)'})

   this.headerUp = this.animationCtrl.create()
   .addElement(this.header.nativeElement)
   .duration(400)
   .fromTo('transform', 'translateY(' + this.headerPeak + 'px)', 'translateY(-80px)')
   .afterStyles({'transform':'translateY(-80px)'})

   this.minimizeImg = this.animationCtrl.create()
   .addElement(this.source.nativeElement)
   .duration(400)
   .fromTo('height', 'translateY(' + this.headerPeak + 'px)', 'translateY(-80px)')
   .afterStyles({'transform':'translateY(-80px)'})

   this.maximizeImg = this.animationCtrl.create()
   .addElement(this.source.nativeElement)
   .duration(400)
   .fromTo('transform', 'translateY(' + this.headerPeak + 'px)', 'translateY(-80px)')
   .afterStyles({'transform':'translateY(-80px)'})

 }

onStart(detail:any){
   console.log(detail.deltaY);
   this.profilePeak = detail.deltaY;
   this.headerPeak = (-80) + (Math.abs(detail.deltaY) / 3);
 }

 onMove(detail:any) {
   console.log(this.fullProfile, detail.deltaY);
   var headerPosi = (-80) + (Math.abs(detail.deltaY) / 3);
   this.profilePeak = detail.deltaY;
   console.log('ici',this.profilePeak);
   this.renderer.setStyle(this.description.nativeElement,'transform','translateY(' + detail.deltaY + 'px)');
   this.renderer.setStyle(this.header.nativeElement,'transform','translateY(' + headerPosi + 'px)');
 }

 onEnd(detail:any){
   this.renderer.setStyle(this.description.nativeElement,'transition','0,4s ease-out');
   this.renderer.setStyle(this.header.nativeElement,'transition','0,4s ease-out');
   if(detail.deltaY > (-100)){
     console.log("OnEnd");
     this.renderer.setStyle(this.description.nativeElement,'transform','translateY(0px)');
     this.renderer.setStyle(this.header.nativeElement,'transform','translateY(-80px)');
   } else if(detail.deltaY <= (-100)){
     this.headerPeak = (-80) + (Math.abs(detail.deltaY) / 3);
     console.log("goUPPPPP",this.profilePeak);
     this.gesture.enable(false);
     this.valuePassed();
     this.bounceInUp.play();
     this.headerDown.play();
     setTimeout (() => {
       this.bounceInUp.stop();
       this.headerDown.stop();
       this.profileGest.enable();
     }, 600);
   }
 }

 onStartProfile(detail:any){
   this.profilePeak = detail.deltaY;
   this.headerPeak = 80 - (detail.deltaY / 3);
 }

 onMoveProfile(detail:any){
   if(detail.deltaY >= 0){
     var headerPosi = 0 - (detail.deltaY / 3);
     var descriptionPosi = -280 + detail.deltaY;
     this.renderer.setStyle(this.description.nativeElement,'transform','translateY(' + descriptionPosi + 'px)');
     this.renderer.setStyle(this.header.nativeElement,'transform','translateY(' + headerPosi + 'px)');
   } else if(detail.deltaY < 0){
     var descriptionPosi = -280 + detail.deltaY;
     this.renderer.setStyle(this.description.nativeElement,'transform','translateY(' + descriptionPosi + 'px)');
   }
 }

 onEndProfile(detail:any){
   this.renderer.setStyle(this.description.nativeElement,'transition','0,4s ease-out');
   this.renderer.setStyle(this.header.nativeElement,'transition','0,4s ease-out');
   if(detail.deltaY > 50){
     this.profilePeak = -280 + detail.deltaY;
     this.headerPeak = 80 - (detail.deltaY / 3);
     console.log("FallDown Values", this.profilePeak, this.headerPeak);
     this.profileGest.enable(false);
     this.fallDown.play();
     this.headerUp.play();
     setTimeout (() => {
       this.fallDown.stop();
       this.headerUp.stop();
       this.gesture.enable();
    }, 500);
   } else if(detail.deltaY <= 50){
     console.log("OnEnd");
     this.renderer.setStyle(this.description.nativeElement,'transform','translateY(-280px)');
     this.renderer.setStyle(this.header.nativeElement,'transform','translateY(0px)');
   }
 }

I’m pretty sure that I’ve done a ridiculous error, but I’m newbie at create animation so I need your help !

Thank you all folks !

PS : I’ve already post it in StackOverFlow, it’s useless to mention it. :slight_smile:

Posts: 1

Participants: 1

Read full topic

Cordova Advanced HTTP - How to cancel request?

$
0
0

@tomjaihk wrote:

I am using cordova-plugin-advanced-http in my ionic app.

Suppose I use it to make HTTP request, how can I cancel request if I want? I know that I can do it by executing unsubscribe when using Angular HttpClient, but how can do it when using cordova http plugin?

Thank you.

Posts: 1

Participants: 1

Read full topic

Simulator cannot connect to backend in HTTPS: Unknown Error

$
0
0

@kdefombelle wrote:

App works fine (@ionic/angular 5.0.7; cf. ionic info attached)

  • in chrome http or https
  • postman api call http or https
  • iOS simulator using ionic cordova prepare ios then executing in XCode in http but not in https

It does not reach the backend at all.
XCode Simulator error message is 2020-04-03 20:24:07.719639+0800 MyApp[23261:938958] ERROR: {"headers":{"normalizedNames":{},"lazyUpdate":null,"headers":{}},"status":0,"statusText":"Unknown Error","url":"https://localhost:443/api/v1/appname/signin","ok":false,"name":"HttpErrorResponse","message":"Http failure response for https://localhost:443/api/v1/appname/signin: 0 Unknown Error","error":{"isTrusted":true}}
any idea of what can be wrong in https from the simulator?

Posts: 1

Participants: 1

Read full topic

Clear memory / remove canvas

$
0
0

@keber wrote:

Hi all,

I’m creating an application where I’m cutting an image into pieces by creating a canvas.
The problem is that if I’m doing it multiple times, the devices memory cache is full because the canvas (and especially the pieces I have created) never gets deleted, I’m getting the error message in the Safari console (while running via iOS simulator):

Total canvas memory use exceeds the maximum limit (224 MB)

Therefore I’m looking for a solution on how to clear the memory, maybe if possible the canvas elements only.

I’ve found a plugin but I’m not sure how to use that.

Does anybody know how to do that?
Thank you so much in advance!

Posts: 1

Participants: 1

Read full topic

Ionic Studio does not open on Mac

$
0
0

@hebsd wrote:

I have created a new user on my Mac OS High Sierra on a SSD and installed ionic studio on it.
it worked fine for a few days but it won’t open now. The icon appears in dock but it does not open. I reinstalled npm but it did not work. I can open my project in safari using terminal with sudo ionic serve when I cd to my project directory. Screen Shot 2020-04-03 at 5.44.05 PM

Posts: 1

Participants: 1

Read full topic

Viewing all 70434 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>