Using a custom cursor in the Butterfly Builder app on this page, when applying the colors via the color palette section, however, Safari is not lining up the cursor where the mouse is moving over the .canvas-container
Have tried both of these in order to line this up, but it never works:
var pBucketHTML = $('<div id="pBrush"><span class="color"></span></div>');
pBucketHTML.css('top', ((e.offsetY + $(this).offset().top) - (pBucketHTML.height() / 2)));
pBucketHTML.css('left', ((e.offsetX + $(this).offset().left) - (pBucketHTML.width() * 2)));
AND
var pBucketHTML = $('<div id="pBrush"><span class="color"></span></div>');
pBucketHTML.css('top', e.pageY - (pBucketHTML.height() / 2));
pBucketHTML.css('left', e.pageX - (pBucketHTML.width() * 2));
LESS I'm using for this:
#pBrush {
width: 24px;
height: 34px;
background: transparent url('../images/paintBrush.png') left bottom no-repeat;
position: fixed;
.color {
position: absolute;
width: 12px;
height: 12px;
border: 1px solid #FFFFFF;
display: inline-block;
top: 0;
right: 0;
left: 0;
margin: 0 auto;
}
}
This is loading up the mouse cursor perfectly fine on Chrome and all other browsers, but Safari is not loading it up with the correct X coordinate... not sure why? Looks like the Y coordinate is correct when moving the mouse of the .canvas-container in the Butterfly builder, just not the X coordinate. How to fix this in Safari?
To see what I mean, please visit: http://memorial.garden and click on the "Launch Butterfly Builder" button on the bottom right hand side of the page. Once you get to Step 2, and choose a color palette, you will see the problem with the pBrush
element. Not sure why this is happening with the x coordinate being off like that.