feat(后端架构): 完善后端解耦
build.yaml / build (push) Successful in 39s

This commit is contained in:
xiaoqidun committed 2026-09-23 16:12:57 +08:00
1 parent 73472c5d4b
commit 77ffbe6a72
56 files changed
+2420 -1635

No files matched your search

+3
View File
@@ -60,6 +60,7 @@ func (e *Editor) transactionSnapshot() Editor {
next.resources = slices.Clone(e.resources)
next.fonts, next.images, next.resourceID = maps.Clone(e.fonts), maps.Clone(e.images), maps.Clone(e.resourceID)
next.origins = maps.Clone(e.origins)
next.fontMetrics = maps.Clone(e.fontMetrics)
if e.source != nil {
source := *e.source
source.pages, source.origins = maps.Clone(source.pages), maps.Clone(source.origins)
@@ -80,6 +81,8 @@ func (e *Editor) restoreTransaction(state Editor) {
maps.Copy(state.resourceID, e.resourceID)
state.history, state.historyIndex, state.historyLimit = e.history, e.historyIndex, e.historyLimit
state.serial, state.maxID = max(e.serial, state.serial), max(e.maxID, state.maxID)
state.backends, state.fontFS = e.backends, e.fontFS
state.fontRenderer, state.fontMetrics = e.fontRenderer, e.fontMetrics
*e = state
}