fix(image-annotate): v1.15.1 退出编辑器后调节基准未清,换图调节会串上一张的像素
This commit is contained in:
1 parent
e10ccee8ad
commit
6a14f900df
7 files changed
+107
-3
No files matched your search
@@ -9,7 +9,7 @@
|
||||
var __IWB_ANNOTATE_MANIFEST__ = {
|
||||
id: 'image-annotate',
|
||||
name: '标注 / 修图',
|
||||
version: '1.15.0',
|
||||
version: '1.15.1',
|
||||
apiVersion: 1,
|
||||
capabilities: ['commands', 'nodeActions', 'canvas', 'canvasWrite'],
|
||||
settings: {
|
||||
@@ -4315,6 +4315,13 @@ var __IWB_ANNOTATE_MANIFEST__ = {
|
||||
sourceCache.set(layer.id, rec);
|
||||
return rec;
|
||||
}
|
||||
function resetAdjustCache() {
|
||||
sourceCache.clear();
|
||||
S.adjust = { layerId: null, source: null, previewCanvas: null, params: zeroAdjust() };
|
||||
}
|
||||
function adjustCacheSize() {
|
||||
return sourceCache.size;
|
||||
}
|
||||
function switchTarget(layer) {
|
||||
const st = S.adjust;
|
||||
if (st && st.layerId && st.source) {
|
||||
@@ -8412,6 +8419,7 @@ var __IWB_ANNOTATE_MANIFEST__ = {
|
||||
S.lastNameClick = null;
|
||||
S.altPicker = false;
|
||||
S.fx = { key: null, value: 0, layerId: null, source: null };
|
||||
resetAdjustCache();
|
||||
S.zCounter = Math.max(S.layers.length - 1, 0);
|
||||
S.placingImage = null;
|
||||
S.placingHandle = null;
|
||||
@@ -8494,6 +8502,7 @@ var __IWB_ANNOTATE_MANIFEST__ = {
|
||||
S.originalImage = null;
|
||||
S.pickerComposite = null;
|
||||
S.fx = { key: null, value: 0, layerId: null, source: null };
|
||||
resetAdjustCache();
|
||||
S.isDrawing = false;
|
||||
S.panning = false;
|
||||
S.penDragPt = -1;
|
||||
@@ -8656,6 +8665,8 @@ var __IWB_ANNOTATE_MANIFEST__ = {
|
||||
hasSource: Boolean(S.adjust && S.adjust.source),
|
||||
params: S.adjust && S.adjust.params ? { ...S.adjust.params } : null
|
||||
},
|
||||
// 调节基准缓存条数:退出编辑器后必须是 0(否则下一张图会拿到上一张的像素)
|
||||
adjustCacheSize: adjustCacheSize(),
|
||||
interaction: S.interaction,
|
||||
ants: !!S._antFrame,
|
||||
view: S.viewX !== null ? [Math.round(S.viewX), Math.round(S.viewY)] : null,
|
||||
|
||||
Reference in new issue
Block a user