Commit 5b599470 authored by Olivia Flynn's avatar Olivia Flynn Committed by Commit Bot

Devtools: Update the rotate orientation tooltip

In the sensors tool, when orientation is disabled, hovering over the
orientation stage shows a message prompting the user to enable
orientation in order to rotate. Before, the tooltip said that the
user could drag to rotate, even when orientation is disabled.
Before and after images: https://imgur.com/a/7RGhZGZ

Change-Id: I40114f3322a85c50744cdb5d2f69a61aa572a8f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1629208
Commit-Queue: Olivia Flynn <t-olflyn@microsoft.com>
Reviewed-by: default avatarJoel Einbinder <einbinder@chromium.org>
Cr-Commit-Position: refs/heads/master@{#664810}
parent 20bd4ae1
......@@ -203,7 +203,6 @@ Emulation.SensorsView = class extends UI.VBox {
this._deviceOrientationFieldset = this._createDeviceOrientationOverrideElement(this._deviceOrientation);
this._stageElement = orientationContent.createChild('div', 'orientation-stage');
this._stageElement.title = Common.UIString('Shift+drag horizontally to rotate around the y-axis');
this._orientationLayer = this._stageElement.createChild('div', 'orientation-layer');
this._boxElement = this._orientationLayer.createChild('section', 'orientation-box orientation-element');
......@@ -230,9 +229,11 @@ Emulation.SensorsView = class extends UI.VBox {
if (disable) {
this._deviceOrientationFieldset.disabled = true;
this._stageElement.classList.add('disabled');
this._stageElement.title = ls`Enable orientation to rotate`;
} else {
this._deviceOrientationFieldset.disabled = false;
this._stageElement.classList.remove('disabled');
this._stageElement.title = ls`Shift+drag horizontally to rotate around the y-axis`;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment