Merge "Merge branch 'stable-3.4'"
diff --git a/polygerrit-ui/app/api/diff.ts b/polygerrit-ui/app/api/diff.ts
index 396fd8e..360ff5c 100644
--- a/polygerrit-ui/app/api/diff.ts
+++ b/polygerrit-ui/app/api/diff.ts
@@ -311,10 +311,11 @@
}
| {type: 'magnifier-clicked'}
| {type: 'magnifier-dragged'}
- | {type: 'version-switcher-clicked'; button: 'base' | 'revision'}
+ | {type: 'version-switcher-clicked'; button: 'base' | 'revision' | 'switch'}
| {type: 'zoom-level-changed'; scale: number | 'fit'}
| {type: 'follow-mouse-changed'; value: boolean}
- | {type: 'background-color-changed'; value: string};
+ | {type: 'background-color-changed'; value: string}
+ | {type: 'automatic-blink-changed'; value: boolean};
export enum GrDiffLineType {
ADD = 'add',
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-image-viewer/gr-image-viewer.ts b/polygerrit-ui/app/elements/diff/gr-diff-image-viewer/gr-image-viewer.ts
index 1d6bc95..2a4b250 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-image-viewer/gr-image-viewer.ts
+++ b/polygerrit-ui/app/elements/diff/gr-diff-image-viewer/gr-image-viewer.ts
@@ -394,7 +394,7 @@
>
Base
</paper-button>
- <paper-fab mini icon="gr-icons:swapHoriz" @click="${this.toggleImage}">
+ <paper-fab mini icon="gr-icons:swapHoriz" @click="${this.manualBlink}">
</paper-fab>
<paper-button
class="right"
@@ -634,7 +634,14 @@
);
}
- toggleImage() {
+ manualBlink() {
+ this.toggleImage();
+ this.dispatchEvent(
+ createEvent({type: 'version-switcher-clicked', button: 'switch'})
+ );
+ }
+
+ private toggleImage() {
if (this.baseUrl && this.revisionUrl) {
this.baseSelected = !this.baseSelected;
}
@@ -651,6 +658,9 @@
this.automaticBlinkTimer = undefined;
}
}
+ this.dispatchEvent(
+ createEvent({type: 'automatic-blink-changed', value: this.automaticBlink})
+ );
}
private setBlinkInterval() {