Skip to content

Instantly share code, notes, and snippets.

@StErMi
Last active June 22, 2017 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StErMi/af50582abee9dc3e8f4258a445c382c4 to your computer and use it in GitHub Desktop.
Save StErMi/af50582abee9dc3e8f4258a445c382c4 to your computer and use it in GitHub Desktop.
QRCode QRCodeRenderer.js
sap.ui.define(['jquery.sap.global'],
function(jQuery) {
"use strict";
/**
* QRCode renderer.
* @static
* @namespace
*/
var QRCodeRenderer = {};
/**
* Renders the HTML for the given control, using the provided {@link sap.ui.core.RenderManager}.
*
* @param {sap.ui.core.RenderManager} oRm The RenderManager that can be used for writing to the render output buffer.
* @param {sap.ui.core.Control} oControl An object representation of the control that should be rendered.
*/
QRCodeRenderer.render = function(oRM, oControl) {
oRM.write("<div");
oRM.writeControlData(oControl);
oRM.addClass("openui5-qrcode");
oRM.writeClasses();
oRM.write(">");
oRM.renderControl(oControl.getAggregation("__qrcodeHTML"));
oRM.write("</div>");
};
return QRCodeRenderer;
}, /* bExport= */ true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment