From e48ec1571e15ca8806fd620c7a6e3ff6236ecfe4 Mon Sep 17 00:00:00 2001 From: bradmartin Date: Wed, 21 Dec 2016 00:14:58 -0600 Subject: [PATCH] bump 1.1.0 --- .npmignore | 9 ++++++++- README.md | 5 ++++- demo/app/main-page.xml | 2 +- demo/package.json | 8 ++++---- package.json | 12 ++++++++---- ripple-common.ts | 1 - ripple.android.ts | 3 +-- ripple.d.ts | 33 ++++++++++++--------------------- ripple.ios.ts | 6 +++--- 9 files changed, 41 insertions(+), 38 deletions(-) diff --git a/.npmignore b/.npmignore index 92f2369..bfd1f28 100644 --- a/.npmignore +++ b/.npmignore @@ -3,4 +3,11 @@ demo/ *.log *.map *.ts -!*.d.ts \ No newline at end of file +.vs +.vs/ +screens/ +*.png +!index.d.ts +*.map +tsconfig.json +*.log \ No newline at end of file diff --git a/README.md b/README.md index 6d17cac..c6a3e8e 100644 --- a/README.md +++ b/README.md @@ -58,4 +58,7 @@ From your command prompt/termial go to your app's root folder and execute: ## Attributes -**rippleColor : string** *optional* - sets the ripple color. \ No newline at end of file +**rippleColor : string** *optional* - sets the ripple color. + +### Contributors +- Morten Sjøgren @ https://github.com/m-abs **Thanks for iOS support** \ No newline at end of file diff --git a/demo/app/main-page.xml b/demo/app/main-page.xml index 3cc0f79..dd643c3 100644 --- a/demo/app/main-page.xml +++ b/demo/app/main-page.xml @@ -1,7 +1,7 @@ - + diff --git a/demo/package.json b/demo/package.json index 82c1f28..0f8b5fe 100644 --- a/demo/package.json +++ b/demo/package.json @@ -1,11 +1,11 @@ { "nativescript": { "id": "org.nativescript.demo", - "tns-ios": { - "version": "2.4.0" - }, "tns-android": { "version": "2.4.1" + }, + "tns-ios": { + "version": "2.4.0" } }, "dependencies": { @@ -21,4 +21,4 @@ "nativescript-dev-typescript": "^0.3.2", "typescript": "^2.0.10" } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 6311d9e..1e16136 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "nativescript-ripple", - "version": "1.0.1", + "version": "1.1.0", "description": "NativeScript plugin to add Material Design ripple effects to any layout.", - "main": "ripple.js", + "main": "ripple", "typings:": "ripple.d.ts", "nativescript": { "platforms": { @@ -12,7 +12,7 @@ }, "scripts": { "build": "tsc", - "demo.ios": "npm run preparedemo && cd demo && tns emulate ios", + "demo.ios": "npm run preparedemo && cd demo && tns emulate ios", "demo.android": "npm run preparedemo && cd demo && tns run android", "preparedemo": "npm run build && cd demo && tns plugin remove nativescript-ripple && tns plugin add .. && tns install", "setup": "cd demo && npm install && cd .. && npm run build && cd demo && tns plugin add .. && cd .." @@ -35,6 +35,10 @@ "name": "Brad Martin", "email": "bradwaynemartin@gmail.com" }, + "contributors": [{ + "name": "Morten Sjøgren", + "url": "https://github.com/m-abs" + }], "bugs": { "url": "https://github.com/bradmartin/nativescript-ripple/issues" }, @@ -47,4 +51,4 @@ "devDependencies": { "typescript": "^2.0.10" } -} +} \ No newline at end of file diff --git a/ripple-common.ts b/ripple-common.ts index ca7db0b..b668503 100644 --- a/ripple-common.ts +++ b/ripple-common.ts @@ -3,7 +3,6 @@ * https://twitter.com/BradWayneMartin * https://github.com/bradmartin * http://bradmartin.net -* Open Source Lib : https://github.com/balysv/material-ripple *************************************************************************************/ import { DependencyObservable, PropertyChangeData, Property, PropertyMetadataSettings } from "ui/core/dependency-observable"; diff --git a/ripple.android.ts b/ripple.android.ts index f8f8fd6..3d86357 100644 --- a/ripple.android.ts +++ b/ripple.android.ts @@ -3,11 +3,10 @@ * https://twitter.com/BradWayneMartin * https://github.com/bradmartin * http://bradmartin.net -* Open Source Lib : https://github.com/balysv/material-ripple +* Open Source Lib for Android : https://github.com/balysv/material-ripple *************************************************************************************/ import * as common from './ripple-common'; - import { Color } from "color"; declare var android: any; diff --git a/ripple.d.ts b/ripple.d.ts index d5906f3..0fdcd5f 100644 --- a/ripple.d.ts +++ b/ripple.d.ts @@ -1,30 +1,21 @@ +import { Property } from "ui/core/dependency-observable"; +import { ContentView } from "ui/content-view"; + /** - * Contains the Ripple class, which represents the ripple effect. + * Represents the Ripple layout. */ +export class Ripple extends ContentView { -declare module "nativescript-ripple" { - import { Property } from "ui/core/dependency-observable"; - import { ContentView } from "ui/content-view"; + public static rippleColorProperty: Property; /** - * Represents the Ripple layout. + * Gets the native [android widget](com.balysv.materialripple.MaterialRippleLayout) that represents the user interface for this component. Valid only when running on Android OS. */ - export class Ripple extends ContentView { - - public static rippleColorProperty: Property; - - - /** - * Gets the native [android widget](com.balysv.materialripple.MaterialRippleLayout) that represents the user interface for this component. Valid only when running on Android OS. - */ - android: any /* com.balysv.materialripple.MaterialRippleLayout */; + android: any /* com.balysv.materialripple.MaterialRippleLayout */; - - /** - * Gets or sets the ripple color. - */ - rippleColor: string; - - } + /** + * Gets or sets the ripple color. + */ + rippleColor: string; } \ No newline at end of file diff --git a/ripple.ios.ts b/ripple.ios.ts index aaa00ac..ee1e465 100644 --- a/ripple.ios.ts +++ b/ripple.ios.ts @@ -3,7 +3,6 @@ * https://twitter.com/BradWayneMartin * https://github.com/bradmartin * http://bradmartin.net -* Open Source Lib : https://github.com/balysv/material-ripple *************************************************************************************/ import * as common from './ripple-common'; @@ -19,6 +18,7 @@ declare var UIView: any; declare var UIViewAnimationOptionCurveEaseOut: any; export class Ripple extends common.Ripple { + performRipple(x: number, y: number) { if (!(this.content instanceof View)) { return; @@ -32,10 +32,10 @@ export class Ripple extends common.Ripple { const radius = Math.min(Math.min(size.height, size.width) / scale * 0.8, 60); const ripple = UIView.alloc().initWithFrame(CGRectMake(0, 0, radius, radius)); ripple.layer.cornerRadius = radius * 0.5; - ripple.backgroundColor = (this.content.backgroundColor || new Color('#000000')).ios; + ripple.backgroundColor = (this.content.backgroundColor || new Color('#000000')).ios; ripple.alpha = 1.0; nativeView.insertSubviewAtIndex(ripple, 0); - ripple.center = CGPointMake(x || 0, y || 0); + ripple.center = CGPointMake(x || 0, y || 0); UIView.animateWithDurationDelayOptionsAnimationsCompletion(0.6, 0, UIViewAnimationOptionCurveEaseOut, () => { ripple.transform = CGAffineTransformMakeScale(scale, scale);