on 12-11-2015 11:13 AM
Hello,
I'm new in SAPUI5 and i'm trying to create a custom control. The idea of this custom control is to create a table with SVG. I want to add an event onclick but i dont know how to do it because my svg is defined during renderer phase. Have you got any idea or tutorial ?
// SVG
- oRm.write("<svg id='test_svg' width='1500' height='400' viewBox='0 0 "+xmax*75+" "+ymax*25+" ' " );
- oRm.writeControlData(oControl);
- oRm.write(" >");
for (var i = 0; i <= xmax ; i++ ){
for (var j = 0 ; j <= ymax ; j++){
oRm.write("<g transform='translate("+i*75+","+j*25+")'>");
- oRm.write("<rect width='75' height='25' style='fill:rgb(132,202,236);stroke-width:0.5;stroke:rgb(0,0,0)' /
- oRm.write("<text fill='white' font-size='6' x='2' y='12' >");
- oRm.write("Case "+i+j+"");
- oRm.write("</text>");
- oRm.write("</g>");
} }
oRm.write("</svg>");
Arthur
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arthur
You have to handle the events in the onAfterRendering function
here is an example
SAPUI5: Signature Pad Control · GitHub
Thanks
-D
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.