Skip to content
This repository was archived by the owner on Mar 5, 2024. It is now read-only.

left/top resizing #191

Closed
truffle123 opened this issue Jan 30, 2017 · 3 comments
Closed

left/top resizing #191

truffle123 opened this issue Jan 30, 2017 · 3 comments

Comments

@truffle123
Copy link

Is it possible to resize gridItem from the left border for horizontal and from the top for vertical resize?
In this case it will resize item and change position.

@BTMorton
Copy link
Owner

Not currently, no. What were you thinking for?

@ThomasSchellenbergNextCentury
Copy link
Contributor

Can't you just add statements to canResize and onMouseMove, like the following?

} else if (mousePos.right > 0 && mousePos.right < this._borderSize && mousePos.bottom > 0 && mousePos.bottom < this._borderSize) {
	this._renderer.setElementStyle(this._ngEl.nativeElement, 'cursor', 'nwse-resize');
} else if (mousePos.right > 0 && mousePos.right < this._borderSize) {
	this._renderer.setElementStyle(this._ngEl.nativeElement, 'cursor', 'ew-resize');
} else if (mousePos.bottom > 0 && mousePos.bottom < this._borderSize) {
	this._renderer.setElementStyle(this._ngEl.nativeElement, 'cursor', 'ns-resize');
}

Or are there other possible side effects?

ThomasSchellenbergNextCentury added a commit to NextCenturyCorporation/angular2-grid that referenced this issue Mar 12, 2018
@ThomasSchellenbergNextCentury
Copy link
Contributor

I started to work on this issue in my fork here:
NextCenturyCorporation@4f9418c

However, NgGrid._resize needs to be updated as well to accommodate left and top resizing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants