profezzorn / ProffieOS-StyleEditor

GNU General Public License v3.0
7 stars 6 forks source link

oops. Dupes fix #133

Closed NoSloppy closed 1 year ago

NoSloppy commented 1 year ago

Currently, calling initGL() in the onPageLoad function is causing duplicate tabs to be created...makes sense somewhat since initGL() is already called just above all the HTML. Removing it like this commit does fixes the duplicate tabs, but the page gets an error in the console that createShader is null. (in the compile() function) In my local version of the Style Editor which I've been picking from, adding the call to initGL() in onPageLoad fixed THAT problem without causing the duplicates problem, so it must have to do with the order of code (I've moved blocks around to keep scripts near associated HTML)

TL;DR, this is a lesser-of-2-evils patch since 2 sets of tabs looks goofy and is wrong of course, while the createShader issue doesn't show up as any noticeable problem (Graflex hilt is rendered fine) and seems to be resolved down the line as further PRs are submitted. A second pair of eyes would be helpful if it needs to be resolved right now , but eventually I think it'll be fine.

profezzorn commented 1 year ago

How about removing the other initGl call?

NoSloppy commented 1 year ago

Strange. Now I don't get the error anymore. This can be closed for now.

NoSloppy commented 1 year ago

Oh wait, yes I do. But the initGL() call at the top of the body can indeed go away it seems.