wsick / Fayde

Inspired by Silverlight; XAML engine using Javascript and rendering to the HTML5 Canvas.
MIT License
189 stars 27 forks source link

OnTouchDown not called #243

Closed opcodewriter closed 8 years ago

opcodewriter commented 8 years ago

I am using the code from the DrawingPad demo, and it's not working, it doesn't draw with mouse. It looks like OnTouchDown is not getting called:

class DrawingPad extends Fayde.Controls.Canvas {
    private _Fingers: DrawingFinger[] = [];
    constructor() {
        super();
        this.Background = Fayde.Media.SolidColorBrush.FromColor(Color.KnownColors.Red);
    }

    OnTouchDown(e: Fayde.Input.TouchEventArgs) {
     var finger = new DrawingFinger(e.Device);      // doesn't step into a breakpoint 
}

If I put a breakpoint in InputManager.ts in

HandleMousePress(button: number, pos: Point): boolean {

it steps into the breakpoint.

Latest Chrome and IE11, Win10

BSick7 commented 8 years ago

This could be specific to a new browser version. Please attach info (browser, version, OS, etc.)

opcodewriter commented 8 years ago

edited

opcodewriter commented 8 years ago

Sorry, it's working, what I actually needed is OnMouseLeftButtonDown, I was tired