Skip to content

Commit

Permalink
fix chooser
Browse files Browse the repository at this point in the history
  • Loading branch information
lacymorrow committed Oct 30, 2023
1 parent e183806 commit 165c65c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/renderer/chooser.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
<i data-feather="x-circle"></i>
</button>

<div id="chooser-wrapper">

<div id="crosshair-chooser"></div>

</div>

</div>

<script src="./chooser.js"></script>
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/chooser.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,16 @@
let label = window.crossover.path.dirname( files[0] )
label = window.crossover.path.parse( label ).name

console.log( `Create group: ${label}` )

for ( const element of files ) {

console.log( `Create group: ${element}` )

if ( typeof element === 'string' ) {

console.log( `group: ${element}`, current, group )

const img = createImage( element, current )
group.append( img )

Expand All @@ -128,6 +134,8 @@
title.textContent = ( label === 'Actual' ) ? 'Real Crosshairs' : label
title.classList.add( 'group-label' )

console.log( chooserElement )

chooserElement.append( title )
chooserElement.append( group )

Expand Down
2 changes: 1 addition & 1 deletion src/renderer/preload-chooser.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ contextBridge.exposeInMainWorld( 'crossover', {
if ( validChannels.has( channel ) ) {

// Deliberately strip event as it includes `sender`
// ipcRenderer.on( channel, ( event, ...args ) => func( ...args ) )
ipcRenderer.on( channel, ( event, ...args ) => func( ...args ) )

}

Expand Down
1 change: 1 addition & 0 deletions test/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ function visualMouseCode() {
puppeteer-mouse-pointer.button-3 {
transition: none;
border-radius: 4px;
border-color: rgba(255,255,0,0.9);
}
puppeteer-mouse-pointer.button-4 {
transition: none;
Expand Down

0 comments on commit 165c65c

Please sign in to comment.