Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

136
Visualizações
Konva text getting overflow outside the lable

We have integrated Konva in our project and we are facing issue with Label and Text. Text getting overflow outside the Label. Expected behaviour enter image description here

Current Behavior: enter image description here

Please find the code snippet :

 self.label = new Konva.Label({
        id: ASSET_LABEL + assetData.properties._id,
        x: assetData.properties.labelCoordinates.x,
        y: assetData.properties.labelCoordinates.y,
        draggable: true
      });
      
       self.tag = new Konva.Tag({
        fill: config.color || Color.DARK_YELLOW,
        stroke: Color.BLACK,
        strokeWidth: LABEL_STROKE_WIDTH,
        cornerRadius: CORNER_RADIUS,
        shadowBlur: SHADOW_BLUR,
        shadowColor: Color.BLUE,
        shadowOpacity: SHADOW_OPACITY
      });
      
      self.text = new Konva.Text({
        padding: 5,
        fill: Color.BLACK,
        align: DEFAULT_TEXT_ALIGNMENT,
        fontFamily: config.fontFamily || DEFAULT_FONT_FAMILY,
        fontSize: config.fontSize || DEFAULT_FONT_SIZE,
        text: displayText
      });
      
       self.label.add(self.tag).add(self.text);
      
      

Please help me with this issue.

Thanks Sanjeev

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda