Browse Source

misc. fixes

master
Inderjit Gill 1 month ago
parent
commit
0353907b45
6 changed files with 8 additions and 7 deletions
  1. +1
    -1
      core/src/context.rs
  2. +0
    -0
      server/run.bat
  3. +0
    -0
      server/run.sh
  4. +4
    -2
      typescript/src/Controller.ts
  5. +1
    -1
      typescript/src/Job.ts
  6. +2
    -3
      www/sw.js

+ 1
- 1
core/src/context.rs View File

@@ -399,7 +399,7 @@ fn var_to_f32_pair(v: &Var) -> Result<(f32, f32)> {
}
}

fn var_to_rgb(v: &Var) -> Result<(Rgb)> {
fn var_to_rgb(v: &Var) -> Result<Rgb> {
if let Var::Colour(col) = v {
let rgb = Rgb::from_colour(&col)?;
Ok(rgb)

server/build.bat → server/run.bat View File


server/build.sh → server/run.sh View File


+ 4
- 2
typescript/src/Controller.ts View File

@@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

///<reference path='Log.ts'/>
///<reference path='Job.ts'/>
///<reference path='SeniMode.ts'/>

@@ -64,7 +65,7 @@ class State {
s.galleryLoaded = false;
s.galleryOldestToDisplay = 9999;
s.galleryItems = {};
s.galleryDisplaySize = 20;
s.galleryDisplaySize = 20; // was 20
s.previouslySelectedGenotypes = [];
s.selectedIndices = [];
s.scriptId = undefined;
@@ -189,10 +190,11 @@ class Controller {

newState.galleryItems = {};
galleryItems.forEach((item: any) => {
// Log.log(`setGalleryItems: ${item.id}`);
newState.galleryItems[item.id] = item;
});
if (galleryItems.length === 0) {
console.error("galleryItems is empty?");
Log.error("galleryItems is empty?");
}

newState.galleryLoaded = true;

+ 1
- 1
typescript/src/Job.ts View File

@@ -62,7 +62,7 @@ namespace Job {
return result;
} catch (error) {
// handle error
console.error(`worker (job:${type}): error of ${error}`);
Log.error(`worker (job:${type}): error of ${error}`);
return undefined; // ???
}
}

+ 2
- 3
www/sw.js View File

@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

const PRECACHE = 'precache-v1';
const PRECACHE = 'precache-v2';
const RUNTIME = 'runtime';

// NOTE: when releasing set DONT_CACHE_SOME_URLS to false and increment the PRECACHE
@@ -38,8 +38,7 @@ const PRECACHE_URLS = [
'/lib/codemirror/codemirror.js',
'/lib/codemirror/closebrackets.js',
'/lib/codemirror/matchbrackets.js',
'/favicon.ico',
'/img/spinner.gif'
'/favicon.ico'
];

// The install handler takes care of precaching the resources we always need.

Loading…
Cancel
Save