mirror of
https://github.com/storytold/deckcraft.git
synced 2026-10-29 21:16:57 -06:00
fix: restore compile and behaviour in Sonar refactors
- fonts: char::is_alphanumeric takes &self, so filter needs a closure - h264: keep the mvd accumulator as i32 (prefix is usize) - model: annotate the non-stacked range accumulators as f64 - engine: chart.options still clears the raw chart XML for upDownBars and quartiles; smartart goes back to the glob import (cmd! macro) - web: keep the original viewport meta (behaviour change) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
3ef6433309
commit
fc1f475e50
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<title>DeckCraft</title>
|
||||
<link data-trunk rel="rust" data-bin="deckcraft-web" data-wasm-opt="z" data-weak-refs />
|
||||
<link data-trunk rel="icon" href="../../assets/app-icon/hicolor/32x32/apps/ai.storyteller.deckcraft.png" />
|
||||
|
||||
@@ -1786,9 +1786,11 @@ fn apply_subtotals_and_bars(c: &mut deckcraft_model::chart::Chart, p: &Value, su
|
||||
}
|
||||
if let Some(b) = p.get("upDownBars").and_then(Value::as_bool) {
|
||||
c.up_down_bars = b;
|
||||
c.raw = None;
|
||||
}
|
||||
if let Some(q) = p.get("quartiles").and_then(Value::as_str) {
|
||||
c.inclusive_quartiles = q.eq_ignore_ascii_case("inclusive");
|
||||
c.raw = None;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ use deckcraft_model::{
|
||||
};
|
||||
use serde_json::{Value, json};
|
||||
|
||||
use super::{CommandSpec, bad, has_selection, str_param, xfrm_of};
|
||||
use super::*;
|
||||
use crate::{EngineError, Result, Session};
|
||||
|
||||
/// Deepest outline level the Text Pane allows.
|
||||
|
||||
@@ -743,7 +743,7 @@ pub fn base_style(style: &str) -> &str {
|
||||
}
|
||||
|
||||
fn norm(s: &str) -> String {
|
||||
s.chars().filter(char::is_alphanumeric).flat_map(char::to_lowercase).collect()
|
||||
s.chars().filter(|c| c.is_alphanumeric()).flat_map(char::to_lowercase).collect()
|
||||
}
|
||||
|
||||
/// Weight implied by a style name.
|
||||
|
||||
@@ -244,7 +244,7 @@ impl SliceDecoder<'_> {
|
||||
while prefix < 9 && c.decode_decision(base + (prefix + 2).min(6)) == 1 {
|
||||
prefix += 1;
|
||||
}
|
||||
let mut val = prefix;
|
||||
let mut val = prefix as i32;
|
||||
if prefix >= 9 {
|
||||
// EG3 suffix
|
||||
let mut k = 3;
|
||||
|
||||
@@ -749,8 +749,8 @@ impl Chart {
|
||||
let (mut lo, mut hi) = if self.kind.stacked() {
|
||||
self.stacked_value_range(n)
|
||||
} else {
|
||||
let mut l = 0.0;
|
||||
let mut h = 0.0;
|
||||
let mut l: f64 = 0.0;
|
||||
let mut h: f64 = 0.0;
|
||||
for s in &self.series {
|
||||
for v in s.values.iter().flatten() {
|
||||
if v.is_finite() {
|
||||
|
||||
Reference in New Issue
Block a user