Vishau commited on
Commit
d959446
·
verified ·
1 Parent(s): 9d84f34

still i cant drag and get the element on my working area. and properties aslo not usable. please make it working - Follow Up Deployment

Browse files
Files changed (2) hide show
  1. index.html +16 -8
  2. prompts.txt +2 -1
index.html CHANGED
@@ -10,6 +10,12 @@
10
  .element-item {
11
  transition: all 0.2s ease;
12
  cursor: grab;
 
 
 
 
 
 
13
  }
14
  .element-item:hover {
15
  transform: translateY(-2px);
@@ -277,6 +283,7 @@
277
  </div>
278
  </div>
279
 
 
280
  <!-- Export Modal -->
281
  <div id="export-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden z-50">
282
  <div class="bg-white rounded-lg shadow-xl w-full max-w-xl">
@@ -641,9 +648,9 @@
641
  emptyCanvasMsg.style.display = 'none';
642
 
643
  const template = elementTemplates[type];
644
- const element = document.createElement('div');
645
- element.innerHTML = template.html;
646
- element = element.firstChild;
647
 
648
  element.style.position = 'absolute';
649
  element.style.left = `${x - (template.width / 2)}px`;
@@ -906,31 +913,31 @@
906
  }
907
 
908
  // Property panel updates
909
- document.getElementById('prop-x').addEventListener('change', function() {
910
  if (selectedElement) {
911
  selectedElement.style.left = `${this.value}px`;
912
  }
913
  });
914
 
915
- document.getElementById('prop-y').addEventListener('change', function() {
916
  if (selectedElement) {
917
  selectedElement.style.top = `${this.value}px`;
918
  }
919
  });
920
 
921
- document.getElementById('prop-width').addEventListener('change', function() {
922
  if (selectedElement) {
923
  selectedElement.style.width = `${this.value}px`;
924
  }
925
  });
926
 
927
- document.getElementById('prop-height').addEventListener('change', function() {
928
  if (selectedElement) {
929
  selectedElement.style.height = `${this.value}px`;
930
  }
931
  });
932
 
933
- document.getElementById('prop-content').addEventListener('change', function() {
934
  if (selectedElement) {
935
  if (selectedElement.dataset.type === 'text') {
936
  selectedElement.querySelector('p').textContent = this.value;
@@ -1090,6 +1097,7 @@
1090
 
1091
  const canvas = document.getElementById('canvas');
1092
  canvas.className = `bg-${bgColor} text-${textColor} shadow-lg w-full max-w-4xl min-h-[80vh] relative canvas-placeholder`;
 
1093
 
1094
  // Update all existing elements with the new color scheme
1095
  document.querySelectorAll('.draggable-element').forEach(el => {
 
10
  .element-item {
11
  transition: all 0.2s ease;
12
  cursor: grab;
13
+ user-select: none;
14
+ }
15
+ .draggable-element {
16
+ position: absolute;
17
+ z-index: 1;
18
+ user-select: none;
19
  }
20
  .element-item:hover {
21
  transform: translateY(-2px);
 
283
  </div>
284
  </div>
285
 
286
+ <script src="https://html2canvas.hertzen.com/dist/html2canvas.min.js"></script>
287
  <!-- Export Modal -->
288
  <div id="export-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden z-50">
289
  <div class="bg-white rounded-lg shadow-xl w-full max-w-xl">
 
648
  emptyCanvasMsg.style.display = 'none';
649
 
650
  const template = elementTemplates[type];
651
+ const tempDiv = document.createElement('div');
652
+ tempDiv.innerHTML = template.html;
653
+ const element = tempDiv.firstChild;
654
 
655
  element.style.position = 'absolute';
656
  element.style.left = `${x - (template.width / 2)}px`;
 
913
  }
914
 
915
  // Property panel updates
916
+ document.getElementById('prop-x').addEventListener('input', function() {
917
  if (selectedElement) {
918
  selectedElement.style.left = `${this.value}px`;
919
  }
920
  });
921
 
922
+ document.getElementById('prop-y').addEventListener('input', function() {
923
  if (selectedElement) {
924
  selectedElement.style.top = `${this.value}px`;
925
  }
926
  });
927
 
928
+ document.getElementById('prop-width').addEventListener('input', function() {
929
  if (selectedElement) {
930
  selectedElement.style.width = `${this.value}px`;
931
  }
932
  });
933
 
934
+ document.getElementById('prop-height').addEventListener('input', function() {
935
  if (selectedElement) {
936
  selectedElement.style.height = `${this.value}px`;
937
  }
938
  });
939
 
940
+ document.getElementById('prop-content').addEventListener('input', function() {
941
  if (selectedElement) {
942
  if (selectedElement.dataset.type === 'text') {
943
  selectedElement.querySelector('p').textContent = this.value;
 
1097
 
1098
  const canvas = document.getElementById('canvas');
1099
  canvas.className = `bg-${bgColor} text-${textColor} shadow-lg w-full max-w-4xl min-h-[80vh] relative canvas-placeholder`;
1100
+ canvas.style.backgroundColor = ''; // Clear inline style
1101
 
1102
  // Update all existing elements with the new color scheme
1103
  document.querySelectorAll('.draggable-element').forEach(el => {
prompts.txt CHANGED
@@ -1 +1,2 @@
1
- ELEMENT AND APPLY THEME IS NOT WORKING AND ALSO PROVE SHARE BUTTON THAT DIRECT LINK TO WHATSAPP
 
 
1
+ ELEMENT AND APPLY THEME IS NOT WORKING AND ALSO PROVE SHARE BUTTON THAT DIRECT LINK TO WHATSAPP
2
+ still i cant drag and get the element on my working area. and properties aslo not usable. please make it working