I am new to Kineticjs but not a great javascript encoder, so I hope to get some help with this example. http://jsfiddle.net/pwM8M/
I am trying to keep the x axis on the doors, so when redrawing not associated with the doors is done, they do not return to the default position. (several types of doors and windows)
Each form element can have several values ββ(more than one door), so I need a way to store / retrieve the data that is currently contained in the warning on jsfiddle.
I did some research but came up empty. Can anyone help with what I have provided?
function OH(x,y,w,h) { var oh = new Kinetic.Text({ x:x, y: y, width: w*scale, height: h*scale, stroke: wtc, strokeWidth: 1, fill: 'brown', fontSize: 6, fontFamily: 'Calibri', padding:4, text: w+' x '+h+' OH\n\n<- DRAG ->', align: 'center', textFill: 'white', draggable: true, dragConstraint:'horizontal', dragBounds: { left:xoffset, right: xoffset+width+length-(w*scale) } }); oh.on('dragend', function(e) { alert(oh.getPosition().x); }); window.south.add(oh); }
Thanks,
source share