Commit d0e3e054 authored by Fred Chasen's avatar Fred Chasen

Fix textNode break issue, string-set first, update snapshots

parent 1dc062c0
......@@ -37,7 +37,7 @@ RUN apt-get update \
# installs, work.
RUN apt-get update && apt-get install -y wget --no-install-recommends \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome-unstable.list' \
&& apt-get update \
&& apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst ttf-freefont \
--no-install-recommends \
......
......@@ -257,8 +257,6 @@ class Layout {
parent = findElement(renderedNode, source);
index = indexOf(container);
node = child(parent, index);
startOffset = container.textContent.slice(offset);
offset = parent.textContent.indexOf(startOffset);
}
if (!node) {
......@@ -318,7 +316,7 @@ class Layout {
let pos = getBoundingClientRect(node);
let left = Math.floor(pos.left);
let right = Math.floor(pos.right);
// console.log(node);
if (!range && left >= end) {
// Check if it is a float
let isFloat = false;
......@@ -365,7 +363,6 @@ class Layout {
// Skip children
if (skip || right < end) {
next = nodeAfter(node, rendered);
if (next) {
walker = walk(next, rendered);
......
......@@ -55,6 +55,7 @@ class StringSets extends Handler {
// this.styleSheet.insertRule(`:root { --string-${name}: "${cssVar}"; }`, this.styleSheet.cssRules.length);
// fragment.style.setProperty(`--string-${name}`, `"${cssVar}"`);
set.first = cssVar;
fragment.style.setProperty(`--string-${name}`, `"${set.first}"`);
} else {
console.log(set.value + "needs css replacement");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment