|
|
|
@ -9,8 +9,6 @@ export default function (width,height){
|
|
|
|
|
const layer=new Konva.Layer({
|
|
|
|
|
x:x,
|
|
|
|
|
y:y,
|
|
|
|
|
width:_width,
|
|
|
|
|
height:_height
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const group=new Konva.Group({
|
|
|
|
@ -32,7 +30,7 @@ export default function (width,height){
|
|
|
|
|
y:0,
|
|
|
|
|
})
|
|
|
|
|
bgGroup.clipFunc(function(ctx) {
|
|
|
|
|
ctx.rect(0, 0, width-929, 182);
|
|
|
|
|
ctx.rect(6, 0, width*0.5+1, 182);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const imageObj = new Image();
|
|
|
|
@ -41,9 +39,9 @@ export default function (width,height){
|
|
|
|
|
const shape = new Konva.Image({
|
|
|
|
|
x: 0,
|
|
|
|
|
y: 0,
|
|
|
|
|
offsetX:7,
|
|
|
|
|
width: 996*0.986,
|
|
|
|
|
height:182*0.986,
|
|
|
|
|
offsetX:6,
|
|
|
|
|
width: width*0.52-14,
|
|
|
|
|
height:182*0.8,
|
|
|
|
|
image: this,
|
|
|
|
|
});
|
|
|
|
|
bgGroup.add(shape)
|
|
|
|
@ -67,7 +65,7 @@ export default function (width,height){
|
|
|
|
|
const person=function (index,persons={}){
|
|
|
|
|
|
|
|
|
|
const width=120,height=110
|
|
|
|
|
const x=index*120+(index+1)*5,y=5
|
|
|
|
|
const x=index*125+(index+1)+14,y=5
|
|
|
|
|
const group=new Konva.Group({
|
|
|
|
|
x:x,
|
|
|
|
|
y:y,
|
|
|
|
@ -100,7 +98,7 @@ export default function (width,height){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
group.on('click touchstart',function (){
|
|
|
|
|
currentWork=item
|
|
|
|
|
currentWork=persons
|
|
|
|
|
if (selectedShape){
|
|
|
|
|
selectedShape.hide()
|
|
|
|
|
if (selectedShape===selectShape){
|
|
|
|
@ -143,7 +141,7 @@ export default function (width,height){
|
|
|
|
|
}
|
|
|
|
|
const text=new Konva.Text({
|
|
|
|
|
x:0,
|
|
|
|
|
y:0,
|
|
|
|
|
y:75,
|
|
|
|
|
width:width,
|
|
|
|
|
height:height,
|
|
|
|
|
text: persons.userName,
|
|
|
|
|