# HG changeset patch # User drewp@bigasterisk.com # Date 2018-06-08 11:50:13 # Node ID 46d1c0f0a5ce5c5c3832e8240afa83b0b8a7a8e6 # Parent fba2a716ef2a494480e87d515a724d8886e32230 attempted redraw fixes, but the real problem is in autodeps Ignore-this: 96cc361f1951d165131d46b8173b6685 diff --git a/light9/web/timeline/adjustable.coffee b/light9/web/timeline/adjustable.coffee --- a/light9/web/timeline/adjustable.coffee +++ b/light9/web/timeline/adjustable.coffee @@ -110,8 +110,9 @@ class window.AdjustableFloatObject exten @ctor2() if not @config.ctx? throw new Error("missing ctx") + # this seems to not fire enough. @config.graph.runHandler(@_syncValue.bind(@), - "adj sync #{@config.subj.value}") + "adj sync #{@config.subj.value} #{@config.pred.value}") _syncValue: () -> @_currentValue = @config.graph.floatValue(@config.subj, @config.pred) @@ -138,6 +139,7 @@ class window.AdjustableFloatObject exten @config.graph.patchObject(@config.subj, @config.pred, @config.graph.LiteralRoundedFloat(newValue), @config.ctx) + #@_syncValue() class window.AdjustableFade extends Adjustable constructor: (@yForV, @zoomInX, @i0, @i1, @note, offset, ctx) -> diff --git a/light9/web/timeline/adjusters.coffee b/light9/web/timeline/adjusters.coffee --- a/light9/web/timeline/adjusters.coffee +++ b/light9/web/timeline/adjusters.coffee @@ -48,6 +48,7 @@ coffeeElementSetup(class AdjustersCanvas @currentDrag.cur = pos @currentDrag.adj.continueDrag( @currentDrag.cur.subtract(@currentDrag.start)) + @redraw() else near = @_adjAtPoint(pos) if @hoveringNear != near @@ -64,13 +65,14 @@ coffeeElementSetup(class AdjustersCanvas # adjuster elements for. Caller invents adjId. makeAdjustable is # a function returning the Adjustable or it is null to clear any # adjusters with this id. - if not @adjs[adjId] or not makeAdjustable? - if not makeAdjustable? + if not makeAdjustable? + if @adjs[adjId] delete @adjs[adjId] - else - adj = makeAdjustable() - @adjs[adjId] = adj - adj.id = adjId + else + # this might be able to reuse an existing one a bit + adj = makeAdjustable() + @adjs[adjId] = adj + adj.id = adjId @redraw() diff --git a/light9/web/timeline/timeline.coffee b/light9/web/timeline/timeline.coffee --- a/light9/web/timeline/timeline.coffee +++ b/light9/web/timeline/timeline.coffee @@ -537,6 +537,7 @@ class Note @_traceBorder(params.screenPts, 2, 0xffd900) @_addMouseBindings() + update: -> if not @parentElem.isActiveNote(@uri)