mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: cleanup apis
This commit is contained in:
@@ -9,17 +9,19 @@ export function navigatingTo(args: EventData) {
|
||||
// class SampleCustomModalTransition extends ModalTransition implements TransitionType {
|
||||
|
||||
// }
|
||||
SharedTransition.DEBUG = true;
|
||||
export class TransitionsModel extends Observable {
|
||||
open() {
|
||||
page.frame.navigate({
|
||||
moduleName: `pages/transitions/transitions-detail`,
|
||||
transition: SharedTransition.custom(new PageTransition(), {
|
||||
toPageStart: {
|
||||
duration: 1000,
|
||||
},
|
||||
fromPageEnd: {
|
||||
duration: 500,
|
||||
},
|
||||
interactiveDismissal: true,
|
||||
// toPageStart: {
|
||||
// duration: 400,
|
||||
// },
|
||||
// fromPageEnd: {
|
||||
// duration: 500,
|
||||
// },
|
||||
}),
|
||||
});
|
||||
}
|
||||
@@ -30,15 +32,15 @@ export class TransitionsModel extends Observable {
|
||||
interactiveDismissal: true,
|
||||
toPageStart: {
|
||||
y: 200,
|
||||
duration: 1000,
|
||||
// duration: 400,
|
||||
},
|
||||
fromPageEnd: {
|
||||
y: 100,
|
||||
duration: 500,
|
||||
// duration: 500,
|
||||
},
|
||||
}),
|
||||
closeCallback(args) {
|
||||
console.log('close modal callback', args);
|
||||
// console.log('close modal callback', args);
|
||||
},
|
||||
} as ShowModalOptions);
|
||||
}
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
<Image sharedTransitionTag="image-modal" src="https://cdn.pixabay.com/photo/2012/08/27/14/19/mountains-55067__340.png" width="100" />
|
||||
<Label row="1" text="NativeScript Rocks!" sharedTransitionTag="open-modal-label" class="text-center" color="black" />
|
||||
|
||||
<ContentView row="2" sharedTransitionTag="open-modal-box1" borderWidth="5" borderColor="yellow" marginTop="20" width="50" height="50" borderRadius="25" backgroundColor="purple" />
|
||||
<ContentView row="3" sharedTransitionTag="open-modal-box2" marginTop="20" width="15" height="15" borderRadius="7" backgroundColor="orange" />
|
||||
<ContentView row="3" sharedTransitionTag="open-modal-box3" marginTop="20" width="15" height="15" borderRadius="7" backgroundColor="red" horizontalAlignment="left" marginLeft="100" />
|
||||
<ContentView row="4" sharedTransitionTag="open-modal-box4" marginTop="20" width="15" height="15" borderRadius="7" backgroundColor="pink" horizontalAlignment="right" marginRight="100" />
|
||||
<ContentView row="2" sharedTransitionTag="open-modal-box1" borderWidth="5" borderColor="yellow" marginTop="20" width="50" height="50" borderRadius="100" backgroundColor="purple" />
|
||||
<ContentView row="3" sharedTransitionTag="open-modal-box2" marginTop="20" width="15" height="15" borderRadius="100" backgroundColor="orange" />
|
||||
<ContentView row="3" sharedTransitionTag="open-modal-box3" marginTop="20" width="15" height="15" borderRadius="100" backgroundColor="red" horizontalAlignment="left" marginLeft="100" />
|
||||
<ContentView row="4" sharedTransitionTag="open-modal-box4" marginTop="20" width="15" height="15" borderRadius="100" backgroundColor="pink" horizontalAlignment="right" marginRight="100" />
|
||||
</GridLayout>
|
||||
|
||||
<ContentView sharedTransitionTag="astronaut" rowSpan="4" translateY="600" opacity="0" isUserInteractionEnabled="false" />
|
||||
|
||||
@@ -3,8 +3,6 @@ import { Observable, ShownModallyData, LoadEventData, Page, ShowModalOptions } f
|
||||
let page: Page;
|
||||
let closeCallback: Function;
|
||||
export function onShownModally(args: ShownModallyData) {
|
||||
console.log('page shown modally');
|
||||
|
||||
closeCallback = args.closeCallback;
|
||||
|
||||
if (args.context) {
|
||||
|
||||
Reference in New Issue
Block a user