public function afterSetForm(\Magento\Catalog\Block\Adminhtml\Product\Attribute\Edit\Tab\Front $subject)
    {
        if ($this->getAttribute() && $this->swatchHelper->isSwatchAttribute($this->getAttribute())) {
            if ($subject->getForm() && $subject->getForm()->getElement('facet_max_size')) {
                $subject->getForm()->getElement('facet_max_size')->setDisabled(true);
            }
        }

        return $subject;
    }
public function afterSetForm(\Magento\Catalog\Block\Adminhtml\Product\Attribute\Edit\Tab\Front $subject)
    {
        if ($this->getAttribute() && $this->swatchHelper->isSwatchAttribute($this->getAttribute())) {
            if ($subject->getForm() && $subject->getForm()->getElement('facet_max_size')) {
                $subject->getForm()->getElement('facet_max_size')->setDisabled(true);
            }
        }

        return $subject;
    }
public function afterSetForm ( \ Magento \ Catalog \ Block \ Adminhtml \ Product \ Attribute \ Edit \ Tab \ Front $ subject ) { if ( $ this -> getAttribute ( ) && $ this -> swatchHelper -> isSwatchAttribute ( $ this -> getAttribute ( ) ) ) { if ( $ subject -> getForm ( ) && $ subject -> getForm ( ) -> getElement ( 'facet_max_size' ) ) { $ subject -> getForm ( ) -> getElement ( 'facet_max_size' ) -> setDisabled ( true ) ; } } return $ subject ; }
Disable facet_max_size field for swatches attributes.

@param \Magento\Catalog\Block\Adminhtml\Product\Attribute\Edit\Tab\Front $subject The StoreFront tab

@return \Magento\Catalog\Block\Adminhtml\Product\Attribute\Edit\Tab\Front
Disable facet_max_size field for swatches attributes .