Skip to content

Commit

Permalink
Update gallery analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Jul 30, 2024
1 parent 427edd8 commit 6d2e3aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Added missing space above gallery component
- Updated gallery analytics

### Security

Expand Down
16 changes: 6 additions & 10 deletions src/nationalarchives/components/gallery/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ export default [
},
{
eventName: "click",
targetElement:
".tna-gallery__navigation-button tna-gallery__navigation-prev",
targetElement: ".tna-gallery__navigation-prev",
on: "click",
data: {
value: ($el, $scope) =>
Expand All @@ -27,8 +26,7 @@ export default [
},
{
eventName: "click",
targetElement:
".tna-gallery__navigation-button tna-gallery__navigation-next",
targetElement: ".tna-gallery__navigation-next",
on: "click",
data: {
value: ($el, $scope) =>
Expand All @@ -38,26 +36,24 @@ export default [
},
},
{
eventName: "key press",
eventName: "keypress",
on: "keydown",
data: {
value: ($el, $scope, event) => event.key,
},
},
{
eventName: "click",
eventName: "enter-fullscreen",
targetElement: '.tna-gallery__options button[value="enter-fullscreen"]',
on: "click",
data: { state: "enter" },
},
{
eventName: "click",
eventName: "exit-fullscreen",
targetElement: '.tna-gallery__options button[value="exit-fullscreen"]',
on: "click",
data: { state: "exit" },
},
{
eventName: "click",
eventName: "index",
targetElement: '.tna-gallery__options button[value="show-index"]',
on: "click",
},
Expand Down

0 comments on commit 6d2e3aa

Please sign in to comment.