Saving an object's shot list no longer re-rolls its picture
This commit is contained in:
parent
4ed4319a0a
commit
7e820a021d
1 changed files with 6 additions and 3 deletions
|
|
@ -892,7 +892,8 @@
|
||||||
+ '<textarea rows="5" style="width:100%;font-size:12px;margin-top:6px" data-propdesc="' + esc(p.id) + '">'
|
+ '<textarea rows="5" style="width:100%;font-size:12px;margin-top:6px" data-propdesc="' + esc(p.id) + '">'
|
||||||
+ esc(p.description || "") + '</textarea>'
|
+ esc(p.description || "") + '</textarea>'
|
||||||
+ (busy ? '' : '<div class="tools" style="margin-top:6px">'
|
+ (busy ? '' : '<div class="tools" style="margin-top:6px">'
|
||||||
+ '<button type="button" class="btn" data-propsave="' + esc(p.id) + '">Draw it from this description · $'
|
+ '<button type="button" class="btn" data-propsave="' + esc(p.id) + '" title="Saves the description and the list of shots. The picture is drawn again only if the description changed.">Save</button>'
|
||||||
|
+ '<button type="button" class="btn" data-propsave="' + esc(p.id) + '" data-again="1">Draw its picture again · $'
|
||||||
+ (p.kind === "vehicle" ? "0.14" : "0.07") + '</button>'
|
+ (p.kind === "vehicle" ? "0.14" : "0.07") + '</button>'
|
||||||
+ (drawn ? '<button type="button" class="btn" data-propshots="' + esc(p.id) + '">Redraw the ' + drawn
|
+ (drawn ? '<button type="button" class="btn" data-propshots="' + esc(p.id) + '">Redraw the ' + drawn
|
||||||
+ ' shot' + (drawn === 1 ? '' : 's') + ' that show it · $' + (drawn * 0.14).toFixed(2) + '</button>' : '')
|
+ ' shot' + (drawn === 1 ? '' : 's') + ' that show it · $' + (drawn * 0.14).toFixed(2) + '</button>' : '')
|
||||||
|
|
@ -1551,8 +1552,10 @@
|
||||||
el.disabled = true;
|
el.disabled = true;
|
||||||
var psl = document.querySelector('[data-propshotlist="' + ppid + '"]');
|
var psl = document.querySelector('[data-propshotlist="' + ppid + '"]');
|
||||||
r = await act("set_prop", { draft_id: CUR, prop_id: ppid, description: pta ? pta.value : "",
|
r = await act("set_prop", { draft_id: CUR, prop_id: ppid, description: pta ? pta.value : "",
|
||||||
shots: psl ? psl.value : null, force: true });
|
shots: psl ? psl.value : null, force: !!el.getAttribute("data-again") });
|
||||||
if (r) { showMsg("msg", "Drawing the reference picture, about $" + r.usd + ". When it looks right, redraw the shots that show it.", "ok"); await refresh(); }
|
if (r) { showMsg("msg", el.getAttribute("data-again")
|
||||||
|
? "Drawing the reference picture again, about $" + r.usd + ". When it looks right, redraw the shots that show it."
|
||||||
|
: "Saved. If you changed the description its picture is being drawn again.", "ok"); await refresh(); }
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((el = hit("data-propshots"))) {
|
if ((el = hit("data-propshots"))) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue