Parametric design in MoI?
 1-8  …  749-768  769-788  789-808  809-828  829-848  …  909-912

Previous
Next
 From:  James (JFH)
7713.789 In reply to 7713.788 
Hi Michael & Max,

>> Maybe another possibility is to do the mousewheel type scroll if you hold down the Ctrl key. <<

This would be a good ideal regardless. The addition of node interaction using the identical gesture to zooming is problematic. Or rather can be...if a node circuitry is such that it takes several seconds to draw result to screen, then accidentally dialling of a variable when intending to zoom, can frustratingly breakup work flow.

So yes, to distinguish the 2 types of interaction, the additional requirement of holding down Ctrl key would be ideal.

.>> I've got pinch to zoom working <<

Pinching would indeed be a more natural way for trackpad users to zoom in NE.

As well a "zoom extents" would be the icing on the cake.

Thanks to both of you for your continued development
James

EDITED: 3 Feb 2018 by JFH

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
7713.790 In reply to 7713.789 
Hi James,

re:
> So yes, to distinguish the 2 types of interaction, the additional requirement of holding down
> Ctrl key would be ideal.

Sounds good.


> As well a "zoom extents" would be the icing on the cake.

Is there any existing functionality in the node editor for that? I've got the gesture event set up for that with a 2 finger double tap ("Smart Zoom") but I haven't looked around yet to see if there's an already made node editor function that I can call.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
7713.791 In reply to 7713.789 
Hi James & Max - here's how to enable Mac trackpad multi-touch navigation in the node editor when the next MoI beta is out. These are all in the file main.js

Inside LGraphCanvas.prototype.bindEvents add this:
code:
	this._trackpadgesture_callback = this.bindFunction(this.trackpadHandler, this);
	canvas.addEventListener("trackpadgesture", this._trackpadgesture_callback, true);


Inside LGraphCanvas.prototype.unbindEvents add this:
code:
	this.canvas.removeEventListener("trackpadggesture", this.trackpadHandler );


Then add this function:
code:
LGraphCanvas.prototype.trackpadHandler = function(e)
{
	if(!this.graph || !this.allow_dragcanvas || this.selection_mode) return;

	if ( e.gestureType == 'Zoom' )
	{
		// Pinch gesture.

		var speed = 2.0;

		var factor = 1.0 + (e.scaleFactor * speed);
		var newscale = this.scale * factor;

		if ( newscale > 0.0 )
		{
			this.adjustMouseEvent(e);

			this.setZoom( newscale, [ e.localX, e.localY ] );
			this.graph.sendActionToCanvas("setDirty",[true,true]);
		}	
	}
	else if ( e.gestureType == 'Scroll' )
	{
		// 2 fingers scroll gesture.

		// If Ctrl is down, return without calling event.preventDefault() so
		// a mouse wheel event will be triggered.
		if ( e.ctrlKey )
			return;

		var speed = 1.0;
		
		this.offset[0] += (e.deltaX * speed) / this.scale;
		this.offset[1] += (e.deltaY * speed) / this.scale;
		this.graph.sendActionToCanvas("setDirty",[true,true]);

		// Note: don't set this.canvas_moved = true; like right mouse drag uses because
		// it's used to disable context menus if the right mouse was dragged instead
		// of clicked. If we set it here it makes context menus hard to launch.
	}
	else if ( e.gestureType == 'SmartZoom' )
	{
		// 2 finger double tap, use for zoom extents / reset view.

		// TODO

	}
	
	e.preventDefault();
}



- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
7713.792 In reply to 7713.791 
Hi Michael,

thank you! I'll add this code to the next version of Nodeeditor.

P.S. Today I bought a trackpad, so I will add full support of multitouch navigation.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
7713.793 
Nodeeditor 1.0 release candidate 2

Added: Multiple start parameters support (example: moi://appdata/nodeeditor/index.html?scheme=Light&somethingelse=123)
Added: You can open second Nodeeditor window by pressing Alt + New button
Added: Nodeeditor doesn't flush clipboard data on window close
Added: Initial Trackpad support (New zoom engine should work fine with all v3/v4 MoI versions. Also I made changes in Knob and Slider nodes. Let's hope I didn't break anything ;))
Added: Some visual improvements

http://moi.maxsm.net/nodeeditor/
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
7713.794 In reply to 7713.793 
http://moiscript.weebly.com/elephant-systegraveme-nodal.html

French version with the French lang.js with quasi all "deviant" ELephant ! :)

Can you detail the open second Nodeeditor window by pressing "Alt + New button" ?

Say I have N shortcut for the first window Editor : what is "Alt + New Buton" ? ( a new shortcut ? ...

My first ShortCut for N is
moi.ui.createDialog( 'nodeeditor/index.html', 'resizeable,defaultWidth:680,defaultHeight:420', moi.ui.mainWindow )

what is the second ?

say i have B for second same ShortCut
moi.ui.createDialog( 'nodeeditor/index.html', 'resizeable,defaultWidth:680,defaultHeight:420', moi.ui.mainWindow )

Say first window open by N

Press B or Alt + B gives nothing! :)

EDITED: 8 Feb 2018 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  mkdm
7713.795 In reply to 7713.793 
WOW!!!

Thank you very much Max!!

I'll try it soon.

Ciao!

- Marco (mkdm)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  James (JFH)
7713.796 In reply to 7713.793 
Great stuff Max,

Zoom functions much better now with trackpad.

Thanks for your continued development
James

P.S. Double tap to zoom to extents is the last piece in the puzzle

EDITED: 9 Feb 2018 by JFH

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
7713.797 In reply to 7713.796 
Hi James,

As Michael wrote above, he will add a trackpad gestures support to the next MoI beta.
Then I'll add pinch/zoom, two-finger scroll, double tap gestures to Nodeeditor.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Barry-H
7713.798 
Hi Max,
I'm getting this type of display on my Surface Pro 4 of latest nodeeditor.
I don't think this is correct and maybe a resolution issue ?
Barry



Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
7713.799 In reply to 7713.798 
Hi Barry

Yes, it's HiDPI mode issue.
Yesterday I also noticed this bug when I run MoI v4+Win7 on my Mac using a virtualization software. So I can reproduce it.
In the same time it works good on Win10.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
7713.800 
About the second button for the nodeeditor ?
http://moi3d.com/forum/index.php?webtag=MOI&msg=7713.794
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
7713.801 In reply to 7713.800 
Hi Pilou,

press Alt button on keyboard and click on "New"/"Nouveau" button on screen (upper left corner of NE window)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
7713.802 In reply to 7713.801 
Perfect! Works like a charm!
Bravo!
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
7713.803 In reply to 7713.798 
Hi Barry
I fixed this bug. Here is updated version: http://moi.maxsm.net/nodeeditor/nodeeditor.v.1.0.rc2b.2018.02.11.zip
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
7713.804 
About the "Second Window"

I am wrong or seems we can Open any number of new windows of the NE ?
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
7713.805 
Another small update:
Added: mac trackpad gestures support
Added: macros directory (put often-used macros to this directory)


http://moi.maxsm.net/nodeeditor/nodeeditor.v.1.0.rc2c.2018.02.11.zip

EDITED: 7 Mar 2022 by SMIRNOV

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Barry-H
7713.806 In reply to 7713.803 
Hi Max,
thanks works great.
Barry
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  James (JFH)
7713.807 In reply to 7713.805 
Hi Max

Thank you for the update:

> Added: mac trackpad gestures support

Pinching to zoom works just as it should! Great work.

However double finger, double tap does not "zoom to extents" as expected.
Rather it zooms to mid-size, but does not centre on the canvas.

Nevertheless it is a vast improvement
Thanks again

James
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
7713.808 In reply to 7713.807 
Hi James

>> However double finger, double tap does not "zoom to extents" as expected.
>> Rather it zooms to mid-size, but does not centre on the canvas.
I'll change the double-tap zoom logic in the next release.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
Show messages:  1-8  …  729-748  749-768  769-788  789-808  809-828  829-848  849-868  …  909-912