I have an existing codebase which creates a Stage, and then adds some layers and in one of the layers KineticJS Polygons are drawn. Now I need to update the background of the polygons when user clicks an element that is outside of the stage.
I have managed to get the stage details and then the exact polygon that I wanted to change and also managed to change the fill the polygon with .SetFill method. When I access the polygon's properties, I see the fill property is set correctly. But the background of polygon is not changed.
Is there anything that we need to do after the .SetFill function? Or, what is the proper way to change/update the fill of a KineticJS shape after its creation? I don't see any update or redraw methods...
The code is in Clojurescript, so I don't have exact JS code, but these are the steps that I have:
polygon.setFill(color hexcode)layer.add(polygon)stage.add(layer)stage.draw()
from KineticJS: .SetFill on a polygon updates the fill property but doesn't fill it with color
No comments:
Post a Comment