manual item upload
This commit is contained in:
@@ -229,19 +229,19 @@
|
||||
</div>
|
||||
|
||||
@if(($template->Type == "Jersey" || $template->Type == "Shirts") && $template->Side == "Front")
|
||||
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="222px" height="380px" style="margin-top:36px; margin-left: -3px;"></canvas>
|
||||
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="222px" height="380px" style="margin-top:42px; margin-left: 0px;"></canvas>
|
||||
@endif
|
||||
|
||||
@if(($template->Type == "Jersey" || $template->Type == "Shirts") && $template->Side == "Back")
|
||||
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="221.107px" height="379.04px" style="margin-top:24px;"></canvas>
|
||||
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="221.107px" height="379.04px" style="margin-top:16px; margin-left:-1px;"></canvas>
|
||||
@endif
|
||||
|
||||
@if($template->Type == "Shorts" && $template->Side == "Right")
|
||||
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="157.933px" height="315.863px" style="margin-top:188px; margin-left: 0px;" ></canvas>
|
||||
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="157.933px" height="315.863px" style="margin-top:175px; margin-left: 0px;" ></canvas>
|
||||
@endif
|
||||
|
||||
@if($template->Type == "Shorts" && $template->Side == "Left")
|
||||
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="157.933px" height="315.863px" style="margin-top:188px; margin-left: 0px;" ></canvas>
|
||||
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="157.933px" height="315.863px" style="margin-top:175px; margin-left: 0px;" ></canvas>
|
||||
@endif
|
||||
|
||||
@if($template->Type == "Shirts" && $template->Side == "Right")
|
||||
@@ -1489,7 +1489,13 @@
|
||||
canvas = window[$(this).attr('data-canvas-id')];
|
||||
canvasID = $(this).attr('data-canvas-id');
|
||||
canvas.calcOffset();
|
||||
// initCanvas();
|
||||
initCanvas();
|
||||
canvas.on('object:moving', function(options) {
|
||||
|
||||
console.log('asdasd')
|
||||
});
|
||||
// canvas.on('selection:cleared', onDeSelected);
|
||||
// canvas.on('object:selected', onSelected);
|
||||
});
|
||||
|
||||
//trigger enter ######################################################################
|
||||
@@ -1592,13 +1598,12 @@
|
||||
options.target.set({
|
||||
left: canvas.width / 2 - options.target.getWidth() / 2,
|
||||
}).setCoords();
|
||||
|
||||
// console.log(canvasID.split("_")[2] + "_" +canvasID.split("_")[1] + "_Border")
|
||||
|
||||
|
||||
// $("#"+canvasID.split("_")[2] + "_" +canvasID.split("_")[1] + "_Border").css({ "display" : "" });
|
||||
document.getElementById(canvasID.split("_")[2] + "_" +canvasID.split("_")[1] + "_Border").setAttribute("display", "");
|
||||
|
||||
}
|
||||
console.log('asdasd')
|
||||
});
|
||||
|
||||
canvas.on('object:rotating', onRotating);
|
||||
@@ -1707,7 +1712,7 @@
|
||||
// console.log("Height =", (obj.getScaleY() * obj.getHeight()).toFixed(2));
|
||||
// console.log("Width = ", (obj.getScaleX() * obj.getWidth()).toFixed(2));
|
||||
|
||||
// console.log('left-', obj.left, 'top-', obj.top);
|
||||
console.log('left-', obj.left, 'top-', obj.top);
|
||||
// console.log('font-', obj.fontSize);
|
||||
|
||||
if(obj != null){
|
||||
@@ -1942,6 +1947,13 @@
|
||||
window.addEventListener("keydown", processKeys, false);
|
||||
// end arrow keys navigations
|
||||
|
||||
// window.addEventListener("mousemove", myFunction, false);
|
||||
|
||||
|
||||
// function myFunction(){
|
||||
// console.log('asda')
|
||||
// }
|
||||
|
||||
//remove object
|
||||
$(document).on('button click', '.remove', function() {
|
||||
var object = canvas.getActiveObject();
|
||||
@@ -2651,7 +2663,7 @@
|
||||
|
||||
var defNameShortLeft = new fabric.Text(defaultNumber, {
|
||||
idNumber:"NumberLeftShorts",
|
||||
top: 278.35,
|
||||
top: 235.35,
|
||||
fontSize: 62.50, // 71.25 for default font size. equivalent 2.5"
|
||||
//height: fabric.util.parseUnit('1in'),
|
||||
fill: '#000000',
|
||||
@@ -2673,7 +2685,7 @@
|
||||
|
||||
var defNameShortRight = new fabric.Text(defaultNumber, {
|
||||
idNumber:"NumberRightShorts",
|
||||
top: 278.35,
|
||||
top: 235.35,
|
||||
fontSize: 62.50, // 71.25 for default font size. equivalent 2.5"
|
||||
//height: fabric.util.parseUnit('1in'),
|
||||
fill: '#000000',
|
||||
@@ -3013,7 +3025,7 @@
|
||||
}
|
||||
|
||||
function getClipartProperties(arrayPathId, randomNumbers) {
|
||||
console.log(arrayPathId);
|
||||
// console.log(arrayPathId);
|
||||
$.ajax({ //create an ajax request to load_page.php
|
||||
|
||||
type: "POST",
|
||||
@@ -3044,7 +3056,7 @@
|
||||
// END 4TH TAB
|
||||
|
||||
// 5TH TAB
|
||||
// for upload image
|
||||
// for upload image
|
||||
document.getElementById('upload-images').onchange = function handleImage(e) {
|
||||
console.log(event);
|
||||
var reader = new FileReader();
|
||||
@@ -3913,8 +3925,8 @@
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
//################### E N D C O L O R P A L E T T E S #######################//
|
||||
|
||||
function myCart(){
|
||||
$.ajax({ //create an ajax request to load_page.php
|
||||
|
||||
|
||||
Reference in New Issue
Block a user