Could the Hammer.js Plugin make use of the Cascade Mechanism

Hello Tiddlywikians, Hello @BurningTreeC especially.
I recently wanted to build a wiki using your implementation of Hammer.js. For those who do not know it yet - the plugin allowed to position Tiddlers freely on the screen and content in the Tiddler.

I had to find out that it causes a js-error in the current firefox and chrome version - an update of the TW-Version does not cure that.

On this occasion I asked myself whether it could make use of the new cascade mechanism which could allow the plugin to work without changing $:/core/ui/PageTemplate/story

What do you think?

It would be great to have this important plugin working!

@JanJo to use this tool would you normally edit the $:/core/ui/PageTemplate/story to add a class(s) to enable the widgets?.

Or can you describe what changes you do? perhaps other tiddlers?

I do not use the hammer tools as I typically don’t use a touch screen, however I am now quite familiar with the cascade mechanism.

I see at http://hammerwidgets.tiddlyspot.com/ at least the following tiddlers need to be edited;

$:/core/ui/EditTemplate/body/editor
$:/core/ui/EditTemplate
$:/core/ui/PageTemplate/story
$:/core/ui/ViewTemplate

The Story Tiddler Cascade loads the View or edit templates, which access config tiddlers - to find which template to use;

$:/config/ui/ViewTemplate = $:/core/ui/ViewTemplate
$:/config/ui/EditTemplate = $:/core/ui/EditTemplate

So for these templates at least you can alter the config file (a shadow) to point to a modified one, and easily restore the defaults.

However above I see also $:/core/ui/PageTemplate/story and $:/core/ui/EditTemplate/body/editor may need to change, possibly others so perhaps it would be better implemented as a new Layout which allows you to start with a new $:/core/ui/PageTemplate and alternative’s for each of the edited tiddlers.

I am not yet fully versed in alternative Page layouts however I believe a large component is styles.

Note: Whilst exploring http://hammerwidgets.tiddlyspot.com/ I was getting errors on the wiki that you described so I could not explore the full story.

Hi @TW_Tones,
this is why I think the plugin could need a makeover.

I have not worked with the cascade mechanism so far but I thought that plugins/mechanisms which need a different viewtemplates are what it is meant for.
The aim of this particular use of the hammerwidget is to give the a different position via the stylesheet - which could be used for building pinboards etcetera. I asked myself whether it is possible to apply the stylesheet by the cascademechanism.

@JanJo perhaos there is.

There are of two aspects to the cascade mechanisium first the new operator and secondly how this has being added to the user interface so you can modify parts of the UI. Thus you could use a custom view template to include additional css but we still need to identify the method. If you conditionaly transclude styles between style tags they will still apply to all visible content. You need to be more specific with selectors.

Perhaps it would be better to use the tiddler class field or the data-tag css methods because these can be targeted.

Lets see if anyone has some better advice.