| <!-- | |
| Copyright (C) 2018 The Android Open Source Project | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software | |
| distributed under the License is distributed on an "AS IS" BASIS, | |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| See the License for the specific language governing permissions and | |
| limitations under the License. | |
| --> | |
| <link rel="import" href="../gr-opacity-diff-mode/gr-opacity-diff-mode.html"> | |
| <link rel="import" href="../gr-resemble-diff-mode/gr-resemble-diff-mode.html"> | |
| <dom-module id="gr-image-diff-tool"> | |
| <template> | |
| <style> | |
| :host { | |
| background-color: #f5f5f5; | |
| font-family: var(--font-family); | |
| display: block; | |
| } | |
| #header { | |
| align-items: center; | |
| border-bottom: 1px solid var(--border-color, #ddd); | |
| border-top: 1px solid var(--border-color, #ddd); | |
| display: inline-flex; | |
| padding: .5em; | |
| width: 100%; | |
| } | |
| h3 { | |
| padding: 0 .5em; | |
| } | |
| #dropdown { | |
| border: 1px solid var(--border-color); | |
| border-radius: 2px; | |
| font-size: var(--font-size-normal); | |
| height: 2em; | |
| margin-left: 1em; | |
| padding: 0 .15em; | |
| } | |
| </style> | |
| <div id="header"> | |
| <h3>Image Diff</h3> | |
| <select value="{{_observeMode::change}}" id="dropdown"> | |
| <option value="resemble">Resemble Mode</option> | |
| <option value="opacity">Opacity Mode</option> | |
| </select> | |
| </div> | |
| <template is="dom-if" if="[[_showResembleMode]]" restamp="true"> | |
| <gr-resemble-diff-mode | |
| base-image="[[baseImage]]" | |
| revision-image="[[revisionImage]]"></gr-resemble-diff-mode> | |
| </template> | |
| <template is="dom-if" if="[[_showOpacityMode]]" restamp="true"> | |
| <gr-opacity-diff-mode | |
| base-image="[[baseImage]]" | |
| revision-image="[[revisionImage]]"></gr-opacity-diff-mode> | |
| </template> | |
| </template> | |
| <script src="gr-image-diff-tool.js"></script> | |
| </dom-module> |