fullstack-lang / gongdoc

A gong stack for editing UML diagrams of gong code
MIT License
1 stars 0 forks source link

change logic, generateSVG not on gongdoc.Commit() anymore #180

Closed thomaspeugeot closed 1 year ago

thomaspeugeot commented 1 year ago

OK, progress, but three issues:

thomaspeugeot commented 1 year ago

Analysis of diagram state rollback.

    rectImplGongstructShape.gongstructShape.Position.X = updatedRect.X
    rectImplGongstructShape.gongstructShape.Position.Y = updatedRect.Y
    rectImplGongstructShape.gongstructShape.Width = updatedRect.Width
    rectImplGongstructShape.gongstructShape.Heigth = updatedRect.Height

problem, updatedRect has not changed. X is still 210

up the callstack analysis. OK, vu. Problem on the gongsvg stack.

func (rect *Rect) OnAfterUpdate(stage *StageStruct, _, frontRect *Rect) {

    log.Println("Rect, OnAfterUpdate", rect.Name)

    if rect.Impl != nil {
        rect.Impl.RectUpdated(rect)
    }

updatedRect should be called