Skip to content

Commit

Permalink
Remove dropZoneWidth & dropZoneHeight are not used
Browse files Browse the repository at this point in the history
  • Loading branch information
dab246 committed Aug 21, 2024
1 parent 6089e03 commit 1683f07
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,9 @@ class WebEditorWidget extends StatefulWidget {

class _WebEditorState extends State<WebEditorWidget> {

static const double _offsetHeight = 50;
static const double _offsetWidth = 90;
static const double _defaultHtmlEditorHeight = 550;

late HtmlEditorController _editorController;
double? dropZoneWidth;
double? dropZoneHeight;
final ValueNotifier<double> _htmlEditorHeight = ValueNotifier(_defaultHtmlEditorHeight);
bool _dropListenerRegistered = false;
Function(Event)? _dropListener;
Expand All @@ -70,14 +66,8 @@ class _WebEditorState extends State<WebEditorWidget> {
_editorController = widget.editorController;
log('_WebEditorState::initState:height: ${widget.height} | width: ${widget.width}');
if (widget.height != null) {
dropZoneHeight = widget.height! - _offsetHeight;
_htmlEditorHeight.value = widget.height ?? _defaultHtmlEditorHeight;
}
if (widget.width != null) {
dropZoneWidth = widget.width! - _offsetWidth;
}
log('_WebEditorState::initState:dropZoneWidth: $dropZoneWidth | dropZoneHeight: $dropZoneHeight');

_dropListener = (event) {
if (event is MessageEvent) {
if (jsonDecode(event.data)['name'] == HtmlUtils.registerDropListener.name) {
Expand Down

0 comments on commit 1683f07

Please sign in to comment.