blob: 0a20ea978dfeb2f433ad1529cc02041f55cf0627 [file] [log] [blame]
<!--
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.
-->
<dom-module id="gr-opacity-diff-mode">
<template>
<style>
:host {
display: block;
}
img {
display: block;
margin:auto;
position: absolute;
height: var(--img-height);
width: var(--img-width);
}
#imageRevision {
opacity: var(--my-opacity-value);
z-index: 1;
}
#imageDiv {
position: relative;
margin: auto;
width: 500px;
}
</style>
<div id="imageDiv">
<img id="imageBase"/>
<img id="imageRevision" data-opacity$="{{opacityValue}}"/>
</div>
<div>
<label>
<input
id="scaleSizesToggle"
type="checkbox"
on-tap="handleScaleSizesToggle">
Scale to same size
</label>
</div>
<label for="opacitySlider">Opacity</label>
<input
type="range"
id="opacitySlider"
min="0.0"
max="1.0"
value="1.0"
step=".01"
on-input="handleOpacityChange"/>
</template>
<script src="gr-opacity-diff-mode.js"></script>
</dom-module>