javascript - Run a method everytime value changes -


I wonder if any of you can help me, which I think is seeing the problem.

I is an element (SVG to be more specific) that I want to change a value every time.

I have the variable: GetThreadTree (). TreeBoxObject.getFirstVisibleRow () that is initially 0. I will run a function updateCanvas () every time the value of GetThreadTree () TreeBoxObject.getFirstVisibleRow () changes.

What do I have:

  canvas.observe (GetThreadTree) treebox object.trust swivel (), "scroll", update converts ());  

but it only calls updateCanvas () once, when it is called for the first time, and for any reason the code executed after it Is not done. I checked the error console and there was nothing.

Any thoughts?

You argue all in the wrong place when you update your value, it would ever be That's the function, such as a place like a treebox object, in one place. Incrementarva () or similar.

Then you can fire that function to an event, such as the Trabexscrolled. The event that you listen to, when it changes, you can check yourself and update as you like.

Use the name of the strange function you are trying to use.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -