Skip to content

Commit

Permalink
element parameter in useLink renamed from initialValue & inline…
Browse files Browse the repository at this point in the history
…d `state` alias
  • Loading branch information
Stassi committed Nov 13, 2024
1 parent 8647e28 commit 652b549
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions public/script/leaflet-fullscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@ function useBoolean(initialValue = false) {
}
}

function useLink(initialValue) {
const state = initialValue
function useLink(element) {
return {
assign(props) {
Object.assign(state, props)
Object.assign(element, props)
},
onClick(handler) {
DomEvent.on(state, 'click', handler)
DomEvent.on(element, 'click', handler)
},
}
}
Expand Down

0 comments on commit 652b549

Please sign in to comment.