Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

135
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda