Giter Club home page Giter Club logo

Comments (5)

ctrl-brk avatar ctrl-brk commented on May 23, 2024

Could you provide a plunker? Same approach works for me with no problem.

from angular2-draggable.

gatno avatar gatno commented on May 23, 2024

Plunker is not easy for this issue.
The Problem is only on nested components.

<app-login-gui></app-login-gui>
Has the following Code:

<app-window>
...
</app-window>

And then in app-window there are the dragable methodes as showed on the first post.

from angular2-draggable.

mkoty avatar mkoty commented on May 23, 2024

I have same problem. But in console I have error:

DbsvSelectedDatablocksContainerComponent.html:1 ERROR TypeError: Cannot read property 'add' of undefined
at DefaultDomRenderer2.webpackJsonp.../../../platform-browser/esm5/platform-browser.js.DefaultDomRenderer2.addClass (platform-browser.js:2879)
at BaseAnimationRenderer.webpackJsonp.../../../platform-browser/esm5/animations.js.BaseAnimationRenderer.addClass (animations.js:563)
at DebugRenderer2.webpackJsonp.../../../core/esm5/core.js.DebugRenderer2.addClass (core.js:15027)
at AngularDraggableDirective.webpackJsonp.../../../../angular2-draggable/angular2-draggable.es5.js.AngularDraggableDirective.ngOnInit (angular2-draggable.es5.js:130)
at checkAndUpdateDirectiveInline (core.js:12095)
at checkAndUpdateNodeInline (core.js:13598)
at checkAndUpdateNode (core.js:13541)
at debugCheckAndUpdateNode (core.js:14413)
at debugCheckDirectivesFn (core.js:14354)
at Object.eval [as updateDirectives] (DbsvSelectedDatablocksContainerComponent.html:1)

from angular2-draggable.

mkoty avatar mkoty commented on May 23, 2024

It oddured in this case:

<mat-card ngDraggable
          class="selected-datablocks-card"
          [handle]="handleByHeader">

  <mat-card-header #handleByHeader
                                  class="selected-datablocks-header">
    <mat-card-title >Selected datablocks</mat-card-title>
  </mat-card-header>

  <mat-card-content class="selected-datablocks-container">
    
  </mat-card-content>
</mat-card>

But everything work then:

<mat-card ngDraggable
          class="selected-datablocks-card"
          [handle]="handleByHeader">

  <mat-card-header class="selected-datablocks-header">
    <mat-card-title #handleByHeader>Selected datablocks</mat-card-title>
  </mat-card-header>

  <mat-card-content class="selected-datablocks-container">
    
  </mat-card-content>
</mat-card>

from angular2-draggable.

jcjobin avatar jcjobin commented on May 23, 2024

It oddured in this case:

<mat-card ngDraggable
          class="selected-datablocks-card"
          [handle]="handleByHeader">

  <mat-card-header #handleByHeader
                                  class="selected-datablocks-header">
    <mat-card-title >Selected datablocks</mat-card-title>
  </mat-card-header>

  <mat-card-content class="selected-datablocks-container">
    
  </mat-card-content>
</mat-card>

But everything work then:

<mat-card ngDraggable
          class="selected-datablocks-card"
          [handle]="handleByHeader">

  <mat-card-header class="selected-datablocks-header">
    <mat-card-title #handleByHeader>Selected datablocks</mat-card-title>
  </mat-card-header>

  <mat-card-content class="selected-datablocks-container">
    
  </mat-card-content>
</mat-card>

I am having the same result as this, have you found a solution? I can make it so that my header title is the handler, but not the header itself.

EDIT: I actually moved it back and got it to work as follows:

<div ngDraggable [handle]="DemoHandle" class="modal-draggable">
    <div #DemoHandle class="modal-header">
      <h5 class="modal-title">Edit Homepage</h5>
      <button type="button" class="close" (click)="closeModal()">
        <span aria-hidden="true">&times;</span>
      </button>
    </div>
</div>

from angular2-draggable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.