Skip to content

Commit 2e3c830

Browse files
authored
Merge branch 'main' into fix/duplicate-csschanged-event-handler
2 parents 62266f5 + e1ff298 commit 2e3c830

File tree

4 files changed

+27
-3
lines changed

4 files changed

+27
-3
lines changed
Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
11
export type { Pair, Transformation, TransformationType, TransformationValue, TransformFunctionsInfo, Point3D, AnimationPromise, Cancelable } from './animation-types';
2-
export { Animation, _resolveAnimationCurve } from './animation';
32
export { KeyframeAnimation, KeyframeAnimationInfo, KeyframeDeclaration, KeyframeInfo } from './keyframe-animation';
3+
import type { AnimationDefinition, AnimationPromise } from './animation-types';
4+
5+
/**
6+
* Defines a animation set.
7+
*/
8+
export class Animation {
9+
constructor(animationDefinitions: Array<AnimationDefinition>, playSequentially?: boolean);
10+
public play: (resetOnFinish?: boolean) => AnimationPromise;
11+
public cancel: () => void;
12+
public isPlaying: boolean;
13+
public _resolveAnimationCurve(curve: any): any;
14+
}
15+
16+
export function _resolveAnimationCurve(curve: any): any;

packages/core/ui/button/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class Button extends TextBase {
1010
/**
1111
* String value used when hooking to tap event.
1212
*
13-
* @nsEvent {EventData} string;
13+
* @nsEvent {EventData} tap
1414
*/
1515
public static tapEvent: string;
1616

packages/core/ui/slider/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class Slider extends View {
1818
/**
1919
* String value used when hooking to accessibilityDecrement event.
2020
*
21-
* @nsEvent {accessibilityDecrementEvent} accessibilityDecrement
21+
* @nsEvent {AccessibilityDecrementEventData} accessibilityDecrement
2222
*/
2323
static readonly accessibilityDecrementEvent = 'accessibilityDecrement';
2424

packages/ui-mobile-base/android/widgets/src/main/java/org/nativescript/widgets/ImageView.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,17 @@ protected void onDraw(Canvas canvas) {
364364
float uniformScale;
365365
float pivotX, pivotY;
366366
switch (this.getScaleType()) {
367+
case CENTER:
368+
uniformScale = 1;
369+
matrix.postTranslate((innerWidth - bitmapWidth) / 2, (innerHeight - bitmapHeight) / 2);
370+
matrix.postScale(uniformScale, uniformScale, innerWidth / 2, innerHeight / 2);
371+
canvas.clipRect(
372+
borderLeftWidth + (innerWidth - bitmapWidth * uniformScale) / 2,
373+
borderTopWidth + (innerHeight - bitmapHeight * uniformScale) / 2,
374+
borderLeftWidth + (innerWidth + bitmapWidth * uniformScale) / 2,
375+
borderTopWidth + (innerHeight + bitmapHeight * uniformScale) / 2
376+
);
377+
break;
367378
case FIT_CENTER: // aspectFit
368379
uniformScale = Math.min(fittingScaleX, fittingScaleY);
369380
matrix.postTranslate((innerWidth - bitmapWidth) / 2, (innerHeight - bitmapHeight) / 2);

0 commit comments

Comments
 (0)