fix(menu): rtl support

Squashed commit of the following:

commit 57b59eb373e76401caf1c42fa696a67e1e6a69b7
Merge: dcf80e416 f26c4b4fe
Author: Amit Moryossef <amitmoryossef@gmail.com>
Date:   Fri Apr 21 14:38:03 2017 +0300

    merge 'master'

commit dcf80e4161f33ca3ff4cea5ce0c6358107bbcdff
Author: Amit Moryossef <amitmoryossef@gmail.com>
Date:   Fri Apr 21 01:24:40 2017 +0300

    tests(menu): add menu rtl tests

commit d65575b9ca63402fdc49991349320ad1dd76f114
Author: Amit Moryossef <amitmoryossef@gmail.com>
Date:   Fri Apr 21 01:24:00 2017 +0300

    tests(mock): add platform to mockMenu

commit faad17ca3231d999296907a9892b3afdb48e124f
Author: Amit Moryossef <amitmoryossef@gmail.com>
Date:   Fri Apr 21 01:23:01 2017 +0300

    fix(menu): update gesture only if it exists

commit e50eb184ec5af3cfdb3634b1d7cfe1899da36054
Author: Amit Moryossef <amitmoryossef@gmail.com>
Date:   Fri Apr 21 00:55:50 2017 +0300

    refactor(menu): use magic get/set for side update

commit 89a1715661fa889157f39401c419fc55d4809f9e
Author: Amit Moryossef <amitmoryossef@gmail.com>
Date:   Thu Apr 20 19:31:49 2017 +0300

    revert(menu): revert removed dependency
    this PR is for a specific feature

commit 7c1263624c68fc2729b24f10956841b6ff0c22f6
Merge: 4465f82f6 860567288
Author: Amit Moryossef <amitmoryossef@gmail.com>
Date:   Thu Apr 20 19:26:10 2017 +0300

    Merge remote-tracking branch 'upstream/master' into menu

commit 4465f82f644a96830379fe3bef8e0fbe53e6f998
Author: Amit Moryossef <amitmoryossef@gmail.com>
Date:   Thu Apr 20 16:11:13 2017 +0300

    style(backdrop): fix code style

commit da4983a16133ee7d85f3393161d16fe1a33d2fa4
Author: Amit Moryossef <amitmoryossef@gmail.com>
Date:   Thu Apr 20 16:09:18 2017 +0300

    revert(renderer): back to renderer1

commit 80ab0941d6351e3787dba11c4a6398da7044fb24
Author: Amit Moryossef <amitmoryossef@gmail.com>
Date:   Sun Apr 16 11:34:34 2017 +0300

    fix(swipe-back): change side according to dir

commit f99cb9844f325f43d9fb7ca22394e7ccff89f3b3
Author: Amit Moryossef <amitmoryossef@gmail.com>
Date:   Sun Apr 16 11:26:49 2017 +0300

    feat(platform): add dir change event emitter

commit 90de5d1105f6554ad759f280d2ed96ff6b3ef28a
Author: Amit Moryossef <amitmoryossef@gmail.com>
Date:   Sat Apr 15 20:13:09 2017 +0300

    fix(menu): add gesture side real-time update
    migrated to Renderer2
This commit is contained in:
Manu Mtz.-Almeida
2017-04-23 18:06:04 +02:00
parent f26c4b4feb
commit 51d507998c
7 changed files with 131 additions and 19 deletions

View File

@ -18,10 +18,14 @@ export class SlideEdgeGesture extends SlideGesture {
});
super(plt, element, opts);
// Can check corners through use of eg 'left top'
this.edges = opts.edge.split(' ');
this.setEdges(opts.edge);
this.maxEdgeStart = opts.maxEdgeStart;
}
setEdges(edges: string) {
this.edges = edges.split(' ');
}
canStart(ev: any): boolean {
let coord = pointerCoord(ev);
this._d = this.getContainerDimensions();