μ¬μ©μ μ μ λλκ·Έ νΈλ€ μ¬μ©μ λν μκ° μμ΅λκΉ?
ν¨λ ν€λ(μ μ²΄κ° μλ)λ₯Ό μ¬μ©νμ¬ νλͺ©μ λλκ·Έ κ°λ₯νκ² λ§λ€λ €κ³ ν©λλ€. κ°λ₯ν λ§μ μ‘°ν©μΌλ‘ μλ μ½λλ₯Ό μλνμ§λ§ μ±κ³΅νμ§ λͺ»νμ΅λλ€.
<div class="grid-stack">
<div class="grid-stack-item"
data-gs-x="0" data-gs-y="0"
data-gs-width="4" data-gs-height="2">
<div class="grid-stack-item-content panel panel-default">
<div class="panel-heading clearfix">
<span class="panel-title pull-left"><span class="glyphicon glyphicon-asterisk"></span> <span class="panel-title-text">Featuring</span></span>
</div>
<div class="panel-body ">
<ul class="list-group">
<li class="list-group-item">a</li>
<li class="list-group-item">v</li>
</ul>
</div>
</div>
</div>
</div
js μ½λ:
var options = {
cell_height: 80,
vertical_margin: 10,
animate: true,
handle: ???
};
this.$('.grid-stack').gridstack(options);
handle:'.panel'
, handle:'panel-heading'
λ° νΈλ€ μμ΄ μλνμ΅λλ€. κ·Έλ¦¬κ³ grid-stack-item-content
ν΄λμ€λ μ κ±°νλ €κ³ μλνμ§λ§ λͺ¨λ κ²½μ°μ κ²°κ³Όλ either the whole thing moves or nothing moves at all
.
νλͺ©μ ν€λλ‘λ§ μ΄λ κ°λ₯νκ² λ§λλ λ°©λ²μ 무μμ λκΉ?
μΌ ν¬λ¦¬μλ
λ¬Έμ λ μ΅μ λ³μμ μλ κ² κ°μ΅λλ€.
λΌμ΄λΈλ¬λ¦¬ μ½λλ₯Ό μ΄ν΄λ³΄λ©΄ 379νλΆν° κΈ°λ³Έ μ΅μ κ³Ό κ΅¬μ± λ°©μμ λ³Ό μ μμ΅λλ€.
μ¬μ©μ μ μ λλκ·Έ κ°λ₯ 컨ν μ΄λμ νΈλ€μ λλκ·Έ κ°λ₯ μμ±μ νμ μμ±μ΄μ΄μΌ ν©λλ€. js μ½λλ λ€μκ³Ό κ°μμΌ ν©λλ€.
var options = {
cell_height: 80,
vertical_margin: 10,
animate: true,
draggable: {
handle: '.panel-heading',
}
};
this.$('.grid-stack').gridstack(options);
λ©μ Έμ. μ λ§ λ§€λ ₯μ μ΄κ΅°μ. λΉμ μ νλ₯ν©λλ€. ν루 μ’ μΌ κ·Έκ²μ κ±·μ΄μ°¨κ³ μ¬κΈ° λΉμ μ λλ΅μ΄ μμ΅λλ€. κ·Έλ¦¬κ³ κ·Έκ²μ λ¨μ§ μλν©λλ€ :) λλμ΅λλ€.
μ λ§ λμμ΄ λμμ΅λλ€. κ°μ¬ν©λλ€.
κ°μ₯ μ μ©ν λκΈ
μΌ ν¬λ¦¬μλ
λ¬Έμ λ μ΅μ λ³μμ μλ κ² κ°μ΅λλ€.
λΌμ΄λΈλ¬λ¦¬ μ½λλ₯Ό μ΄ν΄λ³΄λ©΄ 379νλΆν° κΈ°λ³Έ μ΅μ κ³Ό κ΅¬μ± λ°©μμ λ³Ό μ μμ΅λλ€.
μ¬μ©μ μ μ λλκ·Έ κ°λ₯ 컨ν μ΄λμ νΈλ€μ λλκ·Έ κ°λ₯ μμ±μ νμ μμ±μ΄μ΄μΌ ν©λλ€. js μ½λλ λ€μκ³Ό κ°μμΌ ν©λλ€.