1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- // $scope.printDiv = function() {
- // $(".qrcanvas").empty();
- // angular.forEach(selected.items,function(item){
- function $(selector) {
- return document.querySelector(selector);
- }
- var q= $('.qrcanvas');
- var canvas;
- var colorIn = "#191970";
- var colorOut = "#cd5c5c";
- var colorFore = "#4169e1";
- var colorBack = "#ffffff";
- var options = {
- cellSize: 4,
- foreground: [
- // foreground color
- {style: colorFore},
- // outer squares of the positioner
- {row: 0, rows: 7, col: 0, cols: 7, style: colorOut},
- {row: -7, rows: 7, col: 0, cols: 7, style: colorOut},
- {row: 0, rows: 7, col: -7, cols: 7, style: colorOut},
- // inner squares of the positioner
- {row: 2, rows: 3, col: 2, cols: 3, style: colorIn},
- {row: -5, rows: 3, col: 2, cols: 3, style: colorIn},
- {row: 2, rows: 3, col: -5, cols: 3, style: colorIn},
- ],
- background: colorBack,
- data: "1232",
- typeNumber: 1,
- };
- var effect = 'none';
- if (effect !== 'none') {
- options.effect = {key: effect, value: 1};
- if (effect === 'image') {
- options.background = [colorBack, effectImg];
- }
- }
- // $scope.q.tital=item.uuid;
- // $scope.q.textContent=item.uuid;
- options.reuseCanvas = canvas;
- canvas = qrgen.canvas(options);
- // canvas.outerText=item.uuid;
- // $scope.q.innerHTML=$scope.q.innerHTML+"<div class='col-md-2'>"+item.uuid+"</div>"
- q.appendChild(canvas);
- angular.element("canvas").addClass("canvasclass")
- // })
- // }
|