mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Merge branch 'main' into feat/list-view-sticky-headers
This commit is contained in:
15
packages/core/ui/animation/index.d.ts
vendored
15
packages/core/ui/animation/index.d.ts
vendored
@@ -1,3 +1,16 @@
|
||||
export type { Pair, Transformation, TransformationType, TransformationValue, TransformFunctionsInfo, Point3D, AnimationPromise, Cancelable } from './animation-types';
|
||||
export { Animation, _resolveAnimationCurve } from './animation';
|
||||
export { KeyframeAnimation, KeyframeAnimationInfo, KeyframeDeclaration, KeyframeInfo } from './keyframe-animation';
|
||||
import type { AnimationDefinition, AnimationPromise } from './animation-types';
|
||||
|
||||
/**
|
||||
* Defines a animation set.
|
||||
*/
|
||||
export class Animation {
|
||||
constructor(animationDefinitions: Array<AnimationDefinition>, playSequentially?: boolean);
|
||||
public play: (resetOnFinish?: boolean) => AnimationPromise;
|
||||
public cancel: () => void;
|
||||
public isPlaying: boolean;
|
||||
public _resolveAnimationCurve(curve: any): any;
|
||||
}
|
||||
|
||||
export function _resolveAnimationCurve(curve: any): any;
|
||||
|
||||
2
packages/core/ui/button/index.d.ts
vendored
2
packages/core/ui/button/index.d.ts
vendored
@@ -10,7 +10,7 @@ export class Button extends TextBase {
|
||||
/**
|
||||
* String value used when hooking to tap event.
|
||||
*
|
||||
* @nsEvent {EventData} string;
|
||||
* @nsEvent {EventData} tap
|
||||
*/
|
||||
public static tapEvent: string;
|
||||
|
||||
|
||||
2
packages/core/ui/slider/index.d.ts
vendored
2
packages/core/ui/slider/index.d.ts
vendored
@@ -18,7 +18,7 @@ export class Slider extends View {
|
||||
/**
|
||||
* String value used when hooking to accessibilityDecrement event.
|
||||
*
|
||||
* @nsEvent {accessibilityDecrementEvent} accessibilityDecrement
|
||||
* @nsEvent {AccessibilityDecrementEventData} accessibilityDecrement
|
||||
*/
|
||||
static readonly accessibilityDecrementEvent = 'accessibilityDecrement';
|
||||
|
||||
|
||||
@@ -364,6 +364,17 @@ public class ImageView extends androidx.appcompat.widget.AppCompatImageView impl
|
||||
float uniformScale;
|
||||
float pivotX, pivotY;
|
||||
switch (this.getScaleType()) {
|
||||
case CENTER:
|
||||
uniformScale = 1;
|
||||
matrix.postTranslate((innerWidth - bitmapWidth) / 2, (innerHeight - bitmapHeight) / 2);
|
||||
matrix.postScale(uniformScale, uniformScale, innerWidth / 2, innerHeight / 2);
|
||||
canvas.clipRect(
|
||||
borderLeftWidth + (innerWidth - bitmapWidth * uniformScale) / 2,
|
||||
borderTopWidth + (innerHeight - bitmapHeight * uniformScale) / 2,
|
||||
borderLeftWidth + (innerWidth + bitmapWidth * uniformScale) / 2,
|
||||
borderTopWidth + (innerHeight + bitmapHeight * uniformScale) / 2
|
||||
);
|
||||
break;
|
||||
case FIT_CENTER: // aspectFit
|
||||
uniformScale = Math.min(fittingScaleX, fittingScaleY);
|
||||
matrix.postTranslate((innerWidth - bitmapWidth) / 2, (innerHeight - bitmapHeight) / 2);
|
||||
|
||||
Reference in New Issue
Block a user