javascript - Chrome not displaying the image drawn on the canvas -
i trying display objects drawn on canvas. works fine in firefox in chrome image drawn under canvas.
in case there image on top of canvas on trying draw shapes.
please help.
<script> var oimagebuffer = document.createelement('img'); $(document).ready(function() { document.getelementbyid("semiautoadjustments").style.visibility = "hidden"; checkprogress(); setcanvas("imageresultscanvas"); canvasutils.imagebuffer = oimagebuffer; canvasutils.urlprefix = "${ctx}/project/image?id="; canvasutils.longaxis = 440; canvasutils.shortaxis = 330; populaterecipes(); changecanvasimage("${selectedimageid}"); instantiateprocessedimage(); setprocessedimage(m_oprocessedimage); repaintcanvas(); }); function instantiateprocessedimage() { <c:if test="${not empty selectedprocessimage.toogleprocessedimage}"> var l_limageid = "${selectedprocessimage.toogleprocessedimage.imageid}"; var imagename = "${selectedprocessimage.toogleprocessedimage.imagename}"; var i=0;var d=0; m_oprocessedimage = new processedimage(); m_oprocessedimage.imageid = l_limageid; var l_ajsmeasurements = new array(); <c:foreach var="measitem" varstatus="status" items="${selectedprocessimage.toogleprocessedimage.measurements}"> var l_omeasurement = new measurement(); l_omeasurement.name = "${measitem.name}"; l_omeasurement.value = ${measitem.value}; l_omeasurement.definingpoints = new array(); <c:foreach var="definingpointsitem" varstatus="cnt" items="${measitem.definingpoints}"> l_omeasurement.definingpoints[${cnt.index}] = new pixel(); l_omeasurement.definingpoints[${cnt.index}].x = ${definingpointsitem.x}; l_omeasurement.definingpoints[${cnt.index}].y = ${definingpointsitem.y}; </c:foreach> l_ajsmeasurements.push(l_omeasurement); </c:foreach> m_oprocessedimage.measurements = l_ajsmeasurements; var l_ajsmeasurementboxes = new array(); <c:foreach var="measboxitem" varstatus="meanboxcnt" items="${selectedprocessimage.toogleprocessedimage.measuredboxes}"> var l_omeasuredimagebox = new measuredimagebox(); l_omeasuredimagebox.region = new box(); l_omeasuredimagebox.region.ul = new pixel(); l_omeasuredimagebox.region.lr = new pixel(); l_omeasuredimagebox.region.ul.x = ${measboxitem.region.ul.x}; l_omeasuredimagebox.region.ul.y = ${measboxitem.region.ul.y}; l_omeasuredimagebox.region.lr.x = ${measboxitem.region.lr.x}; l_omeasuredimagebox.region.lr.y = ${measboxitem.region.lr.y}; l_omeasuredimagebox.layerbottoms = ${measboxitem.layerbottoms}; l_omeasuredimagebox.measurements = new array(); <c:foreach var="measfrommeasboxitem" varstatus="measfrommeasboxitemcnt" items="${selectedprocessimage.toogleprocessedimage.measuredboxes[meanboxcnt.index].measurements}"> var l_omeasurement = new measurement(); l_omeasurement.name = "${measfrommeasboxitem.name}"; l_omeasurement.value = ${measfrommeasboxitem.value}; l_omeasurement.definingpoints = new array(); <c:foreach var="measdefptsfrommeasboxitem" varstatus="measdefptsfrommeasboxitemcnt" items="${measfrommeasboxitem.definingpoints}"> l_omeasurement.definingpoints[${measdefptsfrommeasboxitemcnt.index}] = new pixel(); l_omeasurement.definingpoints[${measdefptsfrommeasboxitemcnt.index}].x = ${measdefptsfrommeasboxitem.x}; l_omeasurement.definingpoints[${measdefptsfrommeasboxitemcnt.index}].y = ${measdefptsfrommeasboxitem.y}; </c:foreach> l_omeasuredimagebox.measurements.push(l_omeasurement); </c:foreach> l_ajsmeasurementboxes.push(l_omeasuredimagebox); </c:foreach> m_oprocessedimage.measuredboxes = l_ajsmeasurementboxes; </c:if> } function processedimagefromdto(p_oprocessimagedto) { var l_oprocessedimage = new processedimage(); l_oprocessedimage.measuredboxes = new array(); (var ibox=0; ibox<p_oprocessimagedto.measurementlist.length; ++ibox) { } return l_oprocessedimage; } function getresults4image(obj) { //alert(obj.id); var imageid = obj.id; //get selected recipe name var l_iselectedrecipeindex = document.getelementbyid("recipenameoptionscb").selectedindex var recipename = document.getelementbyid("recipenameoptionscb").children[l_iselectedrecipeindex].text; //refresh page. getresults(imageid, recipename); } function getresults(imageid, recipename) { window.location.href = "${ctx}/viewer/processedimageresults?recipename=" + recipename + "&imageid=" + imageid; } </script>
Comments
Post a Comment