Skip to content

FTS 's issues MEGA THREAD #29

@FutureLearnSole

Description

@FutureLearnSole

to somehow persist ele border draw on dragenter

webpack://Mashlib/node_modules/solid-ui/lib/widgets/dragAndDrop.js

`var dragenterListener = function dragenterListener(e) {
debug.log('dragenter event dropEffect: ' + e.dataTransfer.dropEffect);

if (this.style) {
  //  necessary not sure when
  if (!this.savedStyle) {
    this.savedStyle = {};
    this.savedStyle.border = this.style.border;
    this.savedStyle.backgroundColor = this.style.backgroundColor;
    this.savedStyle.borderRadius = this.style.borderRadius;
  }

  this.style.backgroundColor = '#ccc';
  this.style.border = '0.25em dashed black';
  this.style.borderRadius = '0.3em';
}

e.dataTransfer.dropEffect = 'link';
debug.log('dragenter event dropEffect 2: ' + e.dataTransfer.dropEffect);

};

var dragleaveListener = function dragleaveListener(e) {
debug.log('dragleave event dropEffect: ' + e.dataTransfer.dropEffect);

if (this.savedStyle) {
  this.style.border = this.savedStyle.border;
  this.style.backgroundColor = this.savedStyle.backgroundColor;
  this.style.borderRadius = this.savedStyle.borderRadius;
} else {
  this.style.backgroundColor = 'white';
  this.style.border = '0em solid black';
}

};`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions