Fixed bugs within editable image and working on making it more material like.
This commit is contained in:
		| @@ -24,21 +24,8 @@ class EditableImage extends IgniteElement { | |||||||
|                 flex: 1; |                 flex: 1; | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             mt-editable-image.source:hover:after { |  | ||||||
|                 position: absolute; |  | ||||||
|                 font-family: 'Font Awesome 5 Pro'; |  | ||||||
|                 font-weight: 900; |  | ||||||
|                 content: '\\f332'; |  | ||||||
|                 color: #fff; |  | ||||||
|                 font-size: 2.2em; |  | ||||||
|                 display: flex; |  | ||||||
|                 align-items: center; |  | ||||||
|                 justify-content: center; |  | ||||||
|             } |  | ||||||
|  |  | ||||||
|             mt-editable-image.source:hover { |             mt-editable-image.source:hover { | ||||||
|                 cursor: pointer; |                 cursor: pointer; | ||||||
|                 filter: brightness(0.9); |  | ||||||
|             } |             } | ||||||
|         `; |         `; | ||||||
|     } |     } | ||||||
| @@ -89,6 +76,7 @@ class EditableImage extends IgniteElement { | |||||||
|         event.stopPropagation(); |         event.stopPropagation(); | ||||||
|  |  | ||||||
|         //Get the uploaded file from the file input. |         //Get the uploaded file from the file input. | ||||||
|  |         if (this.fileInput.files.length > 0) { | ||||||
|             var file = this.fileInput.files[0]; |             var file = this.fileInput.files[0]; | ||||||
|  |  | ||||||
|             //Create a reader to read in the file. |             //Create a reader to read in the file. | ||||||
| @@ -104,6 +92,7 @@ class EditableImage extends IgniteElement { | |||||||
|             //Read it. |             //Read it. | ||||||
|             reader.readAsDataURL(file); |             reader.readAsDataURL(file); | ||||||
|         } |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|     onClick() { |     onClick() { | ||||||
|         this.fileInput.click(); |         this.fileInput.click(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user