mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
resize svg previews
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
import preview from '../../../components/preview.js';
|
||||
|
||||
class PreviewFormasAdmin{
|
||||
class PreviewFormasAdmin {
|
||||
|
||||
constructor(tipoLibro, tipoTapa, data) {
|
||||
|
||||
constructor(tipoLibro, tipoTapa, data){
|
||||
|
||||
this.data = data;
|
||||
this.isCosido = $("#isCosido").val();
|
||||
this.tipoTapa = tipoTapa;
|
||||
@ -12,81 +12,97 @@ class PreviewFormasAdmin{
|
||||
this.preview = new preview($('#pv_ec_shape'), tipoLibro, tipoTapa, "fullImage", data);
|
||||
}
|
||||
|
||||
setData(data){
|
||||
setData(data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
init(){
|
||||
|
||||
const self = this;
|
||||
|
||||
$('#tab-pv-bn').on( "click", function() {
|
||||
self.preview.setData(self.data);
|
||||
self.preview.previewInteriorPlana('bn', self.isCosido, self.tipoTapa.includes("dura")?1:0);
|
||||
} );
|
||||
|
||||
$('#tab-pv-bnhq').on( "click", function() {
|
||||
self.preview.setData(self.data);
|
||||
self.preview.previewInteriorPlana('bnhq', self.isCosido, self.tipoTapa.includes("dura")?1:0);
|
||||
} );
|
||||
|
||||
$('#tab-pv-color').on( "click", function() {
|
||||
self.preview.setData(self.data);
|
||||
self.preview.previewInteriorPlana('color', self.isCosido, self.tipoTapa.includes("dura")?1:0);
|
||||
} );
|
||||
|
||||
$('#tab-pv-colorhq').on( "click", function() {
|
||||
self.preview.setData(self.data);
|
||||
self.preview.previewInteriorPlana('colorhq', self.isCosido, self.tipoTapa.includes("dura")?1:0);
|
||||
} );
|
||||
|
||||
$('#tab-pv-rot-bn').on( "click", function() {
|
||||
self.preview.setData(self.data);
|
||||
self.preview.previewRotativa('rot_bn', self.isCosido, self.tipoTapa.includes("dura")?1:0);
|
||||
|
||||
} );
|
||||
|
||||
$('#tab-pv-rot-color').on( "click", function() {
|
||||
|
||||
self.preview.setData(self.data);
|
||||
self.preview.previewRotativa('rot_color', self.isCosido, self.tipoTapa.includes("dura")?1:0);
|
||||
|
||||
} );
|
||||
|
||||
$('#tab-pv-guardas').on( "click", function() {
|
||||
|
||||
self.preview.setData(self.data);
|
||||
self.preview.previewInteriorPlana('guardas', self.isCosido, self.tipoTapa.includes("dura")?1:0);
|
||||
} );
|
||||
|
||||
$('#tab-pv-cubierta').on( "click", function() {
|
||||
|
||||
self.preview.setData(self.data);
|
||||
self.preview.previewInteriorPlana('cubierta', self.isCosido, self.tipoTapa.includes("dura")?1:0);
|
||||
|
||||
} );
|
||||
|
||||
$('#tab-pv-esquema-cubierta').on( "click", function() {
|
||||
|
||||
self.preview.setData(self.data);
|
||||
self.preview.getObjetoLP('ec', self.isCosido, self.tipoTapa.includes("dura")?1:0);
|
||||
self.preview.previewEsquemaCubierta('ec', self.isCosido, self.tipoTapa.includes("dura")?1:0);
|
||||
|
||||
} );
|
||||
|
||||
$('#tab-pv-sobrecubierta').on( "click", function() {
|
||||
|
||||
self.preview.setData(self.data);
|
||||
self.preview.previewInteriorPlana('sobrecubierta', self.isCosido, self.tipoTapa.includes("dura")?1:0);
|
||||
|
||||
} );
|
||||
init() {
|
||||
|
||||
$('#tab-pv-faja').on( "click", function() {
|
||||
|
||||
const self = this;
|
||||
this.preview.resizeEvent();
|
||||
$(".refresh-shape").on("click", () => {
|
||||
$("#accordionPreviewTip").find(".nav-link.active").each((index, element) => {
|
||||
this.preview.setViewBoxToPreview()
|
||||
})
|
||||
})
|
||||
$('#tab-pv-bn').on("click", function () {
|
||||
self.preview.setData(self.data);
|
||||
self.preview.previewInteriorPlana('faja', self.isCosido, self.tipoTapa.includes("dura")?1:0);
|
||||
|
||||
} );
|
||||
self.preview.previewInteriorPlana('bn', self.isCosido, self.tipoTapa.includes("dura") ? 1 : 0);
|
||||
|
||||
});
|
||||
|
||||
$('#tab-pv-bnhq').on("click", function () {
|
||||
self.preview.setData(self.data);
|
||||
self.preview.previewInteriorPlana('bnhq', self.isCosido, self.tipoTapa.includes("dura") ? 1 : 0);
|
||||
|
||||
});
|
||||
|
||||
$('#tab-pv-color').on("click", function () {
|
||||
self.preview.setData(self.data);
|
||||
self.preview.previewInteriorPlana('color', self.isCosido, self.tipoTapa.includes("dura") ? 1 : 0);
|
||||
|
||||
});
|
||||
|
||||
$('#tab-pv-colorhq').on("click", function () {
|
||||
self.preview.setData(self.data);
|
||||
self.preview.previewInteriorPlana('colorhq', self.isCosido, self.tipoTapa.includes("dura") ? 1 : 0);
|
||||
|
||||
});
|
||||
|
||||
$('#tab-pv-rot-bn').on("click", function () {
|
||||
self.preview.setData(self.data);
|
||||
self.preview.previewRotativa('rot_bn', self.isCosido, self.tipoTapa.includes("dura") ? 1 : 0);
|
||||
|
||||
|
||||
});
|
||||
|
||||
$('#tab-pv-rot-color').on("click", function () {
|
||||
|
||||
self.preview.setData(self.data);
|
||||
self.preview.previewRotativa('rot_color', self.isCosido, self.tipoTapa.includes("dura") ? 1 : 0);
|
||||
|
||||
|
||||
});
|
||||
|
||||
$('#tab-pv-guardas').on("click", function () {
|
||||
|
||||
self.preview.setData(self.data);
|
||||
self.preview.previewInteriorPlana('guardas', self.isCosido, self.tipoTapa.includes("dura") ? 1 : 0);
|
||||
|
||||
});
|
||||
|
||||
$('#tab-pv-cubierta').on("click", function () {
|
||||
|
||||
self.preview.setData(self.data);
|
||||
self.preview.previewInteriorPlana('cubierta', self.isCosido, self.tipoTapa.includes("dura") ? 1 : 0);
|
||||
|
||||
|
||||
});
|
||||
|
||||
$('#tab-pv-esquema-cubierta').on("click", function () {
|
||||
|
||||
self.preview.setData(self.data);
|
||||
self.preview.getObjetoLP('ec', self.isCosido, self.tipoTapa.includes("dura") ? 1 : 0);
|
||||
self.preview.previewEsquemaCubierta('ec', self.isCosido, self.tipoTapa.includes("dura") ? 1 : 0);
|
||||
|
||||
|
||||
});
|
||||
|
||||
$('#tab-pv-sobrecubierta').on("click", function () {
|
||||
|
||||
self.preview.setData(self.data);
|
||||
self.preview.previewInteriorPlana('sobrecubierta', self.isCosido, self.tipoTapa.includes("dura") ? 1 : 0);
|
||||
|
||||
|
||||
});
|
||||
|
||||
$('#tab-pv-faja').on("click", function () {
|
||||
|
||||
self.preview.setData(self.data);
|
||||
self.preview.previewInteriorPlana('faja', self.isCosido, self.tipoTapa.includes("dura") ? 1 : 0);
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user