cache css color and don't trigger parents resize event
This commit is contained in:
parent
cac75f9251
commit
5ddd4f99f2
1 changed files with 5 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
(function ($) {
|
||||
|
||||
var color = String(getComputedStyle(document.documentElement).getPropertyValue("--color-text")).trim()
|
||||
$.fn.fakeInput = function(options) {
|
||||
|
||||
var settings = $.extend({
|
||||
|
|
@ -13,14 +13,16 @@
|
|||
self.value = undefined
|
||||
self.height = undefined
|
||||
self.width = undefined
|
||||
self.color = $('body').css('color')
|
||||
self.color = color
|
||||
self.center = settings.align == 'center'
|
||||
self.visible = false
|
||||
|
||||
|
||||
self.attr('tabindex',"0")
|
||||
|
||||
canvas.resize(function(){
|
||||
canvas.resize(function(e){
|
||||
e.stopPropagation()
|
||||
|
||||
var width = canvas.width(),
|
||||
height = canvas.height()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue