mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 21:48:42 +08:00
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:
@ -50,6 +50,8 @@ export class Platform {
|
||||
private _isPortrait: boolean = null;
|
||||
private _uiEvtOpts = false;
|
||||
|
||||
static dirChanged: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
/** @hidden */
|
||||
zone: NgZone;
|
||||
|
||||
@ -313,9 +315,12 @@ export class Platform {
|
||||
* direction needs to be dynamically changed per user/session.
|
||||
* [W3C: Structural markup and right-to-left text in HTML](http://www.w3.org/International/questions/qa-html-dir)
|
||||
* @param {string} dir Examples: `rtl`, `ltr`
|
||||
* @param {boolean} updateDocument
|
||||
*/
|
||||
setDir(dir: string, updateDocument: boolean) {
|
||||
this._dir = (dir || '').toLowerCase();
|
||||
Platform.dirChanged.emit(this._dir);
|
||||
|
||||
if (updateDocument !== false) {
|
||||
this._doc['documentElement'].setAttribute('dir', dir);
|
||||
}
|
||||
|
Reference in New Issue
Block a user