flamewave000 / dragonflagon-fvtt

DragonFlagon FoundryVTT Modules
BSD 3-Clause "New" or "Revised" License
64 stars 62 forks source link

DF Curvy Walls: Third Column Icons Persist #480

Open kajishun opened 1 year ago

kajishun commented 1 year ago

Module DF Curvy Walls v3.4.0

Describe the issue DF Curvy Walls third column of icons persist when changing away from Wall Controls. They also stay large despite having Minimal UI v1.5.6 installed. The first part (persist) is a big deal, the second (staying large) is fairly minor.

To Reproduce

  1. Click Wall Controls.
  2. Click literally any other control.

Expected behavior DF Cuvry Walls third column to go away and get small.

Screenshots (Optional) Added.

image image

cs96and commented 1 year ago

The problem is in ControlManager.ts https://github.com/flamewave000/dragonflagon-fvtt/blob/9a307430fdb7b0d9f497f1d9d72ec941b671b237/lib-df-buttons/src/ControlManager.ts#L167

const firstGroup = groups.find(x => !x.button && !x.toggle);
firstGroup.active = true;
if (firstGroup)
    this.activateGroupByName(firstGroup.name);

The firstGroup.active = true; needs to be moved inside the if statement, as follows...

const firstGroup = groups.find(x => !x.button && !x.toggle);
if (firstGroup) {
    firstGroup.active = true;
    this.activateGroupByName(firstGroup.name);
}

I hacked the transpiled js on my server and it fixed it.

kajishun commented 1 year ago

Cool! Hopefully DF will add this fix!

On Fri, Jul 7, 2023 at 10:51 AM Alan Davies @.***> wrote:

The problem is in ControlManager.ts

https://github.com/flamewave000/dragonflagon-fvtt/blob/9a307430fdb7b0d9f497f1d9d72ec941b671b237/lib-df-buttons/src/ControlManager.ts#L167

const firstGroup = groups.find(x => !x.button && !x.toggle);firstGroup.active = true;if (firstGroup) this.activateGroupByName(firstGroup.name);

The firstGroup.active = true; needs to be moved inside the if statement, as follows...

const firstGroup = groups.find(x => !x.button && !x.toggle);if (firstGroup) { firstGroup.active = true; this.activateGroupByName(firstGroup.name);}

I hacked the transpiled js on my server and it fixed it.

— Reply to this email directly, view it on GitHub https://github.com/flamewave000/dragonflagon-fvtt/issues/480#issuecomment-1625613092, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLLL4EWIP5CRUYRD4C7AETXPAV67ANCNFSM6AAAAAAZFSRG3M . You are receiving this because you authored the thread.Message ID: @.***>

Vornmegil commented 1 year ago

Could you explain for me how to patch this? The file you mention isnt written to my pc when i install this module

DrMcCoy commented 1 year ago

Unfortunately, this is TypeScript and you need to compile that down to JavaScript to run that in FoundryVTT. So you won't find that file as-is when installing the module.

https://github.com/flamewave000/dragonflagon-fvtt#for-developers describes how to build the module from the sources, though that's not exactly a newbie-friendly procedure.