GithubHelp home page GithubHelp logo

Comments (5)

ll931217 avatar ll931217 commented on August 24, 2024

Further testing shows that strokeWidth isn't working either. I changed:

app.$refs.canvas.createCircle({
  left: 50,
  top: 50,
  fill: 'red',
  radius: 10,
  stroke: 'blue',
  strokeWidth: 3
})

to

app.$refs.canvas.createCircle({
  left: 50,
  top: 50,
  fill: 'red',
  radius: 10,
  stroke: 'blue',
  strokeWidth: 9
})

There isn't any noticeable difference

from vue-fabric.

purestart avatar purestart commented on August 24, 2024

from vue-fabric.

ll931217 avatar ll931217 commented on August 24, 2024

you can use property drawWidth or update @.*** app.$refs.canvas.createCircle({ left: 50, top: 50, fill: 'red', radius: 10, stroke: 'blue', drawWidth: 3 }) thanks!

------------------ 原始邮件 ------------------ 发件人: "purestart/vue-fabric" @.>; 发送时间: 2021年4月21日(星期三) 下午2:31 @.>; @.***>; 主题: Re: [purestart/vue-fabric] createCircle Stroke colour (#39) Further testing shows that strokeWidth isn't working either. I changed: app.$refs.canvas.createCircle({ left: 50, top: 50, fill: 'red', radius: 10, stroke: 'blue', strokeWidth: 3 }) to app.$refs.canvas.createCircle({ left: 50, top: 50, fill: 'red', radius: 10, stroke: 'blue', strokeWidth: 9 }) There isn't any noticeable difference — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Hey! So I was able to get the drawWidth to work, however stroke doesn't work. It is still displaying 'grey' colour.

from vue-fabric.

purestart avatar purestart commented on August 24, 2024

from vue-fabric.

ll931217 avatar ll931217 commented on August 24, 2024

I fixed it like this:

curr.forEach(point => {
  const { x, y } = pointConverter(false, parseInt(point.x), parseInt(point.y))

  console.log('Point:', point.type, app.mapPointsSettings[point.type].fill)

  const obj = new fabric.Circle({
    id: point.id,
    objType: point.objType,
    hasControls: false,
    fill: app.mapPointsSettings[point.type].fill,
    stroke: app.mapPointsSettings[point.type].stroke,
    strokeWidth: app.mapPointsSettings[point.type].strokeWidth,
    radius: app.mapPointsSettings[point.type].radius,
    pointType: point.type,
    originX: 'center',
    originY: 'center',
    left: x,
    top: y,
    selectabled: false,
    lockMovementX: true,
    lockMovementY: true
  })

  app.canvas.add(obj)
})

app.canvas.renderAll()

Thanks for your time

from vue-fabric.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.