Unify todos

main
Isaiah Odhner 2021-02-15 13:02:39 -05:00
parent f21433e1ff
commit 0e7dde674f
7 changed files with 20 additions and 18 deletions

View File

@ -78,8 +78,7 @@
* Save text and record transformations so the image can be saved as
SVG (or HTML?) with invisible selectable transformed text elements?
* Every time you move a selection, duplicate the text and create a clip-path for both parts?
* This wouldn't really be nice for screen-readers, only selection
* Well, maybe make only one of them audible for screen-readers
* Make only one of them audible for screen-readers
### Device support

View File

@ -402,7 +402,7 @@
} else {
if (has_hotkey(localizations[without_hotkey])) {
// window.console && console.warn(`Localization has differing accelerator (hotkey) hint: '${localizations[without_hotkey]}' vs '${english_text}'`);
// TODO: detect differing accelerator more generally
// @TODO: detect differing accelerator more generally
return `${remove_hotkey(localizations[without_hotkey])} (${hotkey_def})`;
}
return `${localizations[without_hotkey]} (${hotkey_def})`;

View File

@ -436,6 +436,7 @@ class BmpDecoder {
const location = line * this.width * 4 + x * 8 * 4;
for (let i = 0; i < 8; i++) {
if (x * 8 + i < this.width) {
// @TODO: use setPixelData?
const rgb = this.palette[(b >> (7 - i)) & 0x1];
this.data[location + i * 4 + this.locAlpha] = 255;
this.data[location + i * 4 + this.locBlue] = rgb.blue;
@ -507,6 +508,7 @@ class BmpDecoder {
const b = this.view.getUint8(this.pos); this.pos += 1;
const location = line * this.width * 4 + x * 2 * 4;
const first4 = b >> 4;
// @TODO: use setPixelData?
let rgb = this.palette[first4];
this.data[location + this.locAlpha] = 255;
this.data[location + this.locBlue] = rgb.blue;
@ -517,6 +519,7 @@ class BmpDecoder {
return false;
}
const last4 = b & 0x0f;
// @TODO: use setPixelData?
rgb = this.palette[last4];
this.data[location + 4 + this.locAlpha] = 255;
this.data[location + 4 + this.locBlue] = rgb.blue;
@ -556,7 +559,8 @@ class BmpDecoder {
const c = this.view.getUint8(this.pos); this.pos += 1;
location = this.setPixelData(location, c);
}
// @ts-ignore
// why 1 === 1???
// eslint-disable-next-line no-self-compare
const shouldIncrement = b & (1 === 1);
if (shouldIncrement) {
this.pos += 1;
@ -577,7 +581,7 @@ class BmpDecoder {
this.scanImage(padding, this.width, (x, line) => {
const b = this.view.getUint8(this.pos); this.pos += 1;
const location = line * this.width * 4 + x * 4;
// TODO: use setPixelData?
// @TODO: use setPixelData?
if (b < this.palette.length) {
const rgb = this.palette[b];
this.data[location + this.locRed] = rgb.red;
@ -602,7 +606,7 @@ class BmpDecoder {
this.data[loc + this.locRed] = this.shiftRed(px);
this.data[loc + this.locGreen] = this.shiftGreen(px);
this.data[loc + this.locBlue] = this.shiftBlue(px);
this.data[loc + this.locAlpha] = 255; //this.shiftAlpha(px); // TODO??
this.data[loc + this.locAlpha] = 255; //this.shiftAlpha(px); // @TODO??
});
}
parse24bpp() {

View File

@ -6,7 +6,7 @@ function $Swatch(color){
const swatch_canvas = make_canvas();
$(swatch_canvas).css({pointerEvents: "none"}).appendTo($swatch);
// TODO: clean up event listener
// @TODO: clean up event listener
$G.on("theme-load", ()=> { update_$swatch($swatch); });
$swatch.data("swatch", color);
update_$swatch($swatch, color);

View File

@ -1223,9 +1223,8 @@ function paste(img_or_canvas){
// let x = Math.max(0, Math.ceil($canvas_area.scrollLeft() / magnification));
// if (get_direction() === "rtl") {
// // magic number 8 is a guess, I guess based on the scrollbar width which shows on the left in RTL layout
// // TODO: detect scrollbar width
// // x = Math.max(0, Math.ceil(($canvas_area.innerWidth() - canvas.width + $canvas_area.scrollLeft() + 8) / magnification));
// const scrollbar_width = $canvas_area[0].offsetWidth - $canvas_area[0].clientWidth;
// const scrollbar_width = $canvas_area[0].offsetWidth - $canvas_area[0].clientWidth; // maybe??
// console.log("scrollbar_width", scrollbar_width);
// x = Math.max(0, Math.ceil((-$canvas_area.innerWidth() + $canvas_area.scrollLeft() + scrollbar_width) / magnification + canvas.width));
// }
@ -2355,7 +2354,7 @@ function image_flip_and_rotate(){
$w.addClass("flip-and-rotate");
const $fieldset = $(E("fieldset")).appendTo($w.$main);
// TODO: accelerators (hotkeys)
// @TODO: accelerators (hotkeys)
$fieldset.append(`
<legend>${localize("Flip or rotate")}</legend>
<label><input type="radio" name="flip-or-rotate" value="flip-horizontal" checked/>${localize("Flip horizontal")}</label>
@ -2510,7 +2509,7 @@ function choose_file_name_and_type(dialog_name, default_file_name, default_forma
const $w = new $FormToolWindow(dialog_name);
$w.addClass("save-as");
// TODO: hotkeys (N, T, S, Enter, Esc)
// @TODO: hotkeys (N, T, S, Enter, Esc)
$w.$main.append(`
<label>
File name:

View File

@ -1720,7 +1720,7 @@ window.interpret_command = (input_text, default_to_entering_text)=> {
});
}
// TODO: "scroll to bottom", "scroll by three pages" etc.
// @TODO: "scroll to bottom", "scroll by three pages" etc.
const scrolling_regexp = /\b(?:(?:scroll|pan|move|page)(?:(?: the)? view(?:port)?)?|go|view(?:port)?|look)( to( the)?)? (?:up|down|left|right|north|south|west|east|north ?west|south ?west|north ?east|south ?east)(?:wards?)?(( and)?( to( the)?)? (?:up|down|left|right|north|south|west|east)(wards?)?)?\b(( by)?( a| one)? page)?/i;
const scroll_match = input_text.match(scrolling_regexp);
if (scroll_match) {

View File

@ -229,7 +229,7 @@ body,
}
.component-ghost:not(.dock):after,
.component-ghost:not(.dock):before,
/* TODO: thiccer resize ghost (4px instead of 3px) */
/* @TODO: thiccer resize ghost (4px instead of 3px) */
.resize-ghost.thick:after,
.resize-ghost.thick:before {
content: '';
@ -363,11 +363,11 @@ input[type=number].inset-deep,
select.inset-deep {
background-color: var(--Window);
color: var(--WindowText);
/* TODO: should controls be styled by default, or need .inset-deep or similar? */
/* @TODO: should controls be styled by default, or need .inset-deep or similar? */
/* border-image: var(--inset-deep-border-image); */
}
/* XXX: using inset-deep to mean "thematic" */
/* @XXX: using inset-deep to mean "thematic" */
input[type=text].inset-deep,
input[type=url].inset-deep,
input[type=search].inset-deep,
@ -389,7 +389,7 @@ input[type=number].no-spinner {
Will need a wrapper element or ideally an accessible stylable replacement for the select element for further styling.
Can't use option:hover, or option::after, or select::after, among other things.
*/
/* XXX: using inset-deep to mean "thematic" */
/* @XXX: using inset-deep to mean "thematic" */
select.inset-deep {
/* taken from 98.css: https://jdan.github.io/98.css/ */
/* padding-right and background-position are in layout.css for RTL support (@TODO: RTL theme CSS too) */
@ -419,8 +419,8 @@ input:invalid {
opacity: 0.6;
}
/* XXX: using .inset-deep to mean "thematic" */
/* TODO: show percentage on progress bar, white (HilightText) where it overlaps the Hilight */
/* @XXX: using .inset-deep to mean "thematic" */
/* @TODO: show percentage on progress bar, white (HilightText) where it overlaps the Hilight */
progress[value].inset-deep {
display: block;
appearance: none;