Estoy usando Konva e intento cambiar el color de relleno de una etiqueta usando setAttrs, sin embargo, sigo recibiendo un error "setAttrs no es una función". Estoy tratando de comenzar obteniendo un elemento secundario de la etiqueta y configurando el atributo. de eso. ¿Alguna idea sobre lo que podría estar haciendo mal?
// Add labels for each IO var IO = new Konva.Label({ x: 10, y: 10, name: "Tag 1", }); IO.add( new Konva.Tag({ fill: '#C1EFF5', stroke: '#555', strokeWidth: 2, }) ); IO.add( new Konva.Text({ text: "TestText", fontFamily: 'Calibri', fontSize: 12, padding: 5, fill: 'black', }) ); // Add listening Events such as clicking IO.on('click', function () { // get only Tag var tagsClicked = this.getChildren(function(node){ return node.getClassName() === 'Tag'; }); tagsClicked.setAttrs({ fill: 'red' }); }); // Add the input to the group for display group.add(IO);