Skip to content

Commit

Permalink
Merge pull request #118 from cynack/feat/hotspot_close_button
Browse files Browse the repository at this point in the history
style: カメラの位置を初期位置に戻すボタンのスタイルを変更
  • Loading branch information
futahei authored May 18, 2022
2 parents 9dcffa4 + c42111d commit 8b15d2c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

- *panel*のサイズを調整
- CSS で指定したカスタム色が影響を及ぼす範囲を拡大
- カメラの位置を初期位置に戻すボタンのスタイルを変更

### Deprecated

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ <h4>タイトル</h4>
visible-state="neutral"
>
クローズアップ2
<div slot="panel" place="middle center">
<div slot="panel" place="right bottom">
<img src="https://admin.figni.io//sample/suitcase/caption_1.png" />
<h4>タイトル</h4>
<p>文章</p>
Expand Down
4 changes: 2 additions & 2 deletions src/figni-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ export default class FigniViewerElement extends HTMLElement {
}px - 0.5rem)`
panel.style.maxHeight = `calc(${
(baseHeight - hotspotHeight) / 2
}px - 0.75rem)`
}px - 2.25rem)`
} else if (v === 'middle' && h == 'center') {
panel.style.maxWidth = `${baseWidth / 2}px`
panel.style.maxHeight = `calc(${baseHeight}px - 4rem)`
Expand All @@ -937,7 +937,7 @@ export default class FigniViewerElement extends HTMLElement {
}px - 0.5rem)`
panel.style.maxHeight = `calc(${
(baseHeight - hotspotHeight) / 2
}px - 3.25rem)`
}px - 2.25rem)`
}
panel.classList.toggle('figni-viewer-panel-hide')
})
Expand Down
6 changes: 3 additions & 3 deletions src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,12 @@ figni-viewer * {
align-items: center;
width: 2.5rem;
height: 2.5rem;
bottom: 0.5rem;
right: 0.5rem;
top: 0.5rem;
left: 0.5rem;
border-radius: 0.5rem;
border: none;
color: white;
background-color: var(--figni-viewer-primary);
background-color: var(--figni-viewer-error);
z-index: 9995;
transition: 1s cubic-bezier(0, 1, 0.3, 1) all;
-webkit-tap-highlight-color: transparent;
Expand Down

0 comments on commit 8b15d2c

Please sign in to comment.