Jump to content

Ext.ux.Spotlight


Recommended Posts

UX used to provide a spotlight around a specified component/element.

image.thumb.png.87a6dd76ff019e1a0b9882189d6ba349.png

 

1. MainForm.Script ->

var spotlight = Ext.create('Ext.ux.Spotlight', {
    easing: 'easeOut',
    duration: 500
});

spotlight.hideAndInactive = function() {
    this.hide();
    this.active = false;
};

2. CustomCSS ->

.x-spotlight {
    background-color: #ccc;
    z-index: 99999;
    position: absolute;
    top: 0;
    left: 0;
    -moz-opacity: 0.5;
    opacity: .50;
    filter: alpha(opacity=50);
    width: 0;
    height: 0;
    zoom: 1;
    font-size: 0;
}

3. Initialization ->

initialization
  UniAddCSSLibrary('build/packages/ux/classic/classic/resources/ux-all.css', False, [upoFolderJS, upoPlatformDesktop]);
  UniAddJSLibrary('build/packages/ux/classic/ux.js', False, [upoFolderJS, upoPlatformDesktop]);

 

Simple usage ->

Show:

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
  JSInterface.JSCallGlobal('spotlight.show', [UniEdit1.JSId]);
end;

Hide:

procedure TMainForm.UniEdit1Click(Sender: TObject);
begin
  JSInterface.JSCallGlobal('spotlight.hideAndInactive', []);
end;

 

Link to comment
Share on other sites

2 minutes ago, Sherzod said:

UX used to provide a spotlight around a specified component/element.

image.thumb.png.87a6dd76ff019e1a0b9882189d6ba349.png

 

1. MainForm.Script ->

var spotlight = Ext.create('Ext.ux.Spotlight', {
    easing: 'easeOut',
    duration: 500
});

spotlight.hideAndInactive = function() {
    this.hide();
    this.active = false;
};

2. CustomCSS ->

.x-spotlight {
    background-color: #ccc;
    z-index: 99999;
    position: absolute;
    top: 0;
    left: 0;
    -moz-opacity: 0.5;
    opacity: .50;
    filter: alpha(opacity=50);
    width: 0;
    height: 0;
    zoom: 1;
    font-size: 0;
}

3. Initialization ->

initialization
  UniAddCSSLibrary('build/packages/ux/classic/classic/resources/ux-all.css', False, [upoFolderJS, upoPlatformDesktop]);
  UniAddJSLibrary('build/packages/ux/classic/ux.js', False, [upoFolderJS, upoPlatformDesktop]);

 

Simple usage ->

Show:

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
  JSInterface.JSCallGlobal('spotlight.show', [UniEdit1.JSId]);
end;

Hide:

procedure TMainForm.UniEdit1Click(Sender: TObject);
begin
  JSInterface.JSCallGlobal('spotlight.hideAndInactive', []);
end;

 

Добрый день! А можно ли сделать водяные знаки(water mark), используя эту конструкцию? 

Link to comment
Share on other sites

4 minutes ago, Sherzod said:

Добрый день,

В смысле?

Необходимо сделать водяные знаки на всю форму, надпись с текстлм пользователя, чтоб повторялось по всей форме и была прозрачной. Чтоб в случае скриншота, можно было идентифировать пользователя

Link to comment
Share on other sites

2 minutes ago, =GGG= said:

Необходимо сделать водяные знаки на всю форму, надпись с текстлм пользователя, чтоб повторялось по всей форме и была прозрачной. Чтоб в случае скриншота, можно было идентифировать пользователя

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...