-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from NativeScript/fix/gestures-patches
fix: gestures
- Loading branch information
Showing
206 changed files
with
15,091 additions
and
4,899 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
require('@nativescript/canvas-polyfill'); | ||
import { Application } from '@nativescript/core'; | ||
Application.run({ moduleName: 'app-root' }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,57 @@ | ||
import {EventData, Page} from '@nativescript/core'; | ||
import {DemoSharedCanvas} from '@demo/shared'; | ||
import { EventData, Page, WebView } from '@nativescript/core'; | ||
import { DemoSharedCanvas } from '@demo/shared'; | ||
|
||
export function navigatingTo(args: EventData) { | ||
const page = <Page>args.object; | ||
page.bindingContext = new DemoModel(); | ||
} | ||
|
||
export function loaded(args) { | ||
const view = <WebView>args.object; | ||
view.src = ` | ||
<script> | ||
document.addEventListener('DOMContentLoaded', ()=>{ | ||
const canvas = document.createElement('canvas'); | ||
canvas.style = "width:100%;height:100%;background-color:red;"; | ||
document.body.appendChild(canvas); | ||
canvas.addEventListener('touchstart', e =>{ | ||
console.log('touchstart',e); | ||
}); | ||
canvas.addEventListener('pointerdown', e =>{ | ||
console.log('pointerdown',e); | ||
}); | ||
canvas.addEventListener('pointermove', e =>{ | ||
console.log('pointermove',e); | ||
}); | ||
canvas.addEventListener('touchmove', e =>{ | ||
console.log('touchmove',e); | ||
}); | ||
canvas.addEventListener('pointerup', e =>{ | ||
console.log('pointerup',e); | ||
}); | ||
canvas.addEventListener('touchend', e =>{ | ||
console.log('touchend',e); | ||
}); | ||
canvas.addEventListener('pointercancel', e =>{ | ||
console.log('pointercancel',e); | ||
}); | ||
canvas.addEventListener('touchcancel', e =>{ | ||
console.log('touchcancel',e); | ||
}); | ||
canvas.addEventListener('wheel', e =>{ | ||
console.log('wheel',e); | ||
}); | ||
}, false); | ||
</script> | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
</body> | ||
</html> | ||
`; | ||
} | ||
|
||
export class DemoModel extends DemoSharedCanvas { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.